@@ -742,22 +742,24 @@ public JsonLocation currentTokenLocation() {
742
742
return getTokenLocation ();
743
743
}
744
744
745
- // TODO: deprecate in 2.14 or later
746
745
/**
747
- * Alias for {@link #currentLocation()}, to be deprecated in later
748
- * Jackson 2.x versions (and removed from Jackson 3.0).
746
+ * Deprecated alias for {@link #currentLocation()} (removed from Jackson 3.0).
749
747
*
750
748
* @return Location of the last processed input unit (byte or character)
749
+ *
750
+ * @deprecated Since 2.17 use {@link #currentLocation()} instead
751
751
*/
752
+ @ Deprecated // since 2.17
752
753
public abstract JsonLocation getCurrentLocation ();
753
754
754
- // TODO: deprecate in 2.14 or later
755
755
/**
756
- * Alias for {@link #currentTokenLocation()}, to be deprecated in later
757
- * Jackson 2.x versions (and removed from Jackson 3.0).
756
+ * Deprecated alias for {@link #currentTokenLocation()} (removed from Jackson 3.0).
758
757
*
759
758
* @return Starting location of the token parser currently points to
759
+ *
760
+ * @deprecated Since 2.17 use {@link #currentTokenLocation()} instead
760
761
*/
762
+ @ Deprecated // since 2.17
761
763
public abstract JsonLocation getTokenLocation ();
762
764
763
765
/**
@@ -776,8 +778,21 @@ public JsonLocation currentTokenLocation() {
776
778
* @since 2.13 (added as replacement for older {@link #getCurrentValue()}
777
779
*/
778
780
public Object currentValue () {
779
- // TODO: implement directly in 2.14 or later, make getCurrentValue() call this
780
- return getCurrentValue ();
781
+ // Note: implemented directly in 2.17, no longer delegating to getCurrentValue()
782
+ JsonStreamContext ctxt = getParsingContext ();
783
+ return (ctxt == null ) ? null : ctxt .getCurrentValue ();
784
+ }
785
+
786
+ /**
787
+ * Deprecated alias for {@link #currentValue()} (removed from Jackson 3.0).
788
+ *
789
+ * @return Location of the last processed input unit (byte or character)
790
+ *
791
+ * @deprecated Since 2.17 use {@link #currentValue()} instead
792
+ */
793
+ @ Deprecated // since 2.17
794
+ public Object getCurrentValue () {
795
+ return currentValue ();
781
796
}
782
797
783
798
/**
@@ -791,34 +806,23 @@ public Object currentValue() {
791
806
* @since 2.13 (added as replacement for older {@link #setCurrentValue}
792
807
*/
793
808
public void assignCurrentValue (Object v ) {
794
- // TODO: implement directly in 2.14 or later, make setCurrentValue() call this
795
- setCurrentValue (v );
796
- }
797
-
798
- // TODO: deprecate in 2.14 or later
799
- /**
800
- * Alias for {@link #currentValue()}, to be deprecated in later
801
- * Jackson 2.x versions (and removed from Jackson 3.0).
802
- *
803
- * @return Location of the last processed input unit (byte or character)
804
- */
805
- public Object getCurrentValue () {
809
+ // Note: implemented directly in 2.17, no longer delegating to setCurrentValue()
806
810
JsonStreamContext ctxt = getParsingContext ();
807
- return (ctxt == null ) ? null : ctxt .getCurrentValue ();
811
+ if (ctxt != null ) {
812
+ ctxt .setCurrentValue (v );
813
+ }
808
814
}
809
815
810
- // TODO: deprecate in 2.14 or later
811
816
/**
812
- * Alias for {@link #assignCurrentValue}, to be deprecated in later
813
- * Jackson 2.x versions (and removed from Jackson 3.0).
817
+ * Deprecated alias for {@link #assignCurrentValue(Object)} (removed from Jackson 3.0).
814
818
*
815
819
* @param v Current value to assign for the current input context of this parser
820
+ *
821
+ * @deprecated Since 2.17 use {@link #assignCurrentValue} instead
816
822
*/
823
+ @ Deprecated // since 2.17
817
824
public void setCurrentValue (Object v ) {
818
- JsonStreamContext ctxt = getParsingContext ();
819
- if (ctxt != null ) {
820
- ctxt .setCurrentValue (v );
821
- }
825
+ assignCurrentValue (v );
822
826
}
823
827
824
828
/*
@@ -1398,7 +1402,7 @@ public int currentTokenId() {
1398
1402
public boolean isExpectedNumberIntToken () { return currentToken () == JsonToken .VALUE_NUMBER_INT ; }
1399
1403
1400
1404
/**
1401
- * Access for checking whether current token is a special
1405
+ * Accessor for checking whether current token is a special
1402
1406
* "not-a-number" (NaN) token (including both "NaN" AND
1403
1407
* positive/negative infinity!). These values are not supported by all formats:
1404
1408
* JSON, for example, only supports them if
@@ -1417,7 +1421,7 @@ public int currentTokenId() {
1417
1421
* @throws IOException for low-level read issues, or
1418
1422
* {@link JsonParseException} for decoding problems
1419
1423
*
1420
- * @since 2.9
1424
+ * @since 2.9 (slight change in semantics in 2.17)
1421
1425
*/
1422
1426
public boolean isNaN () throws IOException {
1423
1427
return false ;
@@ -1473,15 +1477,17 @@ public boolean isNaN() throws IOException {
1473
1477
/**********************************************************
1474
1478
*/
1475
1479
1476
- // TODO: deprecate in 2.14 or later
1477
1480
/**
1478
1481
* Alias of {@link #currentName()}.
1479
1482
*
1480
1483
* @return Name of the current field in the parsing context
1481
1484
*
1482
1485
* @throws IOException for low-level read issues, or
1483
1486
* {@link JsonParseException} for decoding problems
1487
+ *
1488
+ * @deprecated use {@link #currentName} instead.
1484
1489
*/
1490
+ @ Deprecated
1485
1491
public abstract String getCurrentName () throws IOException ;
1486
1492
1487
1493
/**
0 commit comments