@@ -48,22 +48,23 @@ public enum Feature implements FormatFeature
48
48
DECODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING (false ),
49
49
50
50
/**
51
- * Feature that determines how an {@code undefined} value ({@code 0xF7}) is decoded.
51
+ * Feature that determines how an {@code undefined} value ({@code 0xF7}) is exposed
52
+ * by parser.
52
53
* <p>
53
- * When enabled, the parser returns {@link JsonToken#VALUE_EMBEDDED_OBJECT} with a
54
- * value of {@code null}, allowing the caller to distinguish {@code undefined} from actual
54
+ * When enabled, the parser returns {@link JsonToken#VALUE_EMBEDDED_OBJECT} with
55
+ * a value of {@code null}, allowing the caller to distinguish {@code undefined} from actual
55
56
* {@link JsonToken#VALUE_NULL}.
56
- * When disabled (default, for backwards compatibility), {@code undefined} value is
57
- * reported as {@link JsonToken#VALUE_NULL}, maintaining legacy behavior
58
- * in use up to Jackson 2.19 .
57
+ * When disabled {@code undefined} value is reported as {@link JsonToken#VALUE_NULL}.
58
+ *<p>
59
+ * The default value is {@code false} for backwards compatibility (with versions prior to 2.20) .
59
60
*
60
61
* @since 2.20
61
62
*/
62
- HANDLE_UNDEFINED_AS_EMBEDDED_OBJECT (false )
63
+ READ_UNDEFINED_AS_EMBEDDED_OBJECT (false )
63
64
;
64
65
65
- final boolean _defaultState ;
66
- final int _mask ;
66
+ private final boolean _defaultState ;
67
+ private final int _mask ;
67
68
68
69
/**
69
70
* Method that calculates bit set (flags) of all features that
@@ -206,7 +207,7 @@ public int getFirstTag() {
206
207
* @since 2.20
207
208
*/
208
209
protected int _formatFeatures ;
209
-
210
+
210
211
/**
211
212
* Codec used for data binding when (if) requested.
212
213
*/
@@ -1933,7 +1934,7 @@ private final byte[] _getBinaryFromString(Base64Variant variant) throws IOExcept
1933
1934
* Checking whether the current token represents an `undefined` value (0xF7).
1934
1935
* <p>
1935
1936
* This method allows distinguishing between real {@code null} and `undefined`,
1936
- * even if {@link CBORParser.Feature#HANDLE_UNDEFINED_AS_EMBEDDED_OBJECT } is disabled
1937
+ * even if {@link CBORParser.Feature#READ_UNDEFINED_AS_EMBEDDED_OBJECT } is disabled
1937
1938
* and the token is reported as {@link JsonToken#VALUE_NULL}.
1938
1939
*
1939
1940
* @return {@code true} if current token is an `undefined`, {@code false} otherwise
@@ -3694,14 +3695,14 @@ private final static long _long(int i1, int i2)
3694
3695
* as {@link JsonToken#VALUE_NULL} by default.
3695
3696
* <p>
3696
3697
*
3697
- * since 2.20 If {@link CBORParser.Feature#HANDLE_UNDEFINED_AS_EMBEDDED_OBJECT } is enabled,
3698
+ * since 2.20 If {@link CBORParser.Feature#READ_UNDEFINED_AS_EMBEDDED_OBJECT } is enabled,
3698
3699
* the value will instead be decoded as {@link JsonToken#VALUE_EMBEDDED_OBJECT}
3699
3700
* with an embedded value of {@code null}.
3700
3701
*
3701
3702
* @since 2.10
3702
3703
*/
3703
3704
protected JsonToken _decodeUndefinedValue () {
3704
- if (Feature .HANDLE_UNDEFINED_AS_EMBEDDED_OBJECT .enabledIn (_formatFeatures )) {
3705
+ if (Feature .READ_UNDEFINED_AS_EMBEDDED_OBJECT .enabledIn (_formatFeatures )) {
3705
3706
_binaryValue = null ; // should be clear but just in case
3706
3707
return JsonToken .VALUE_EMBEDDED_OBJECT ;
3707
3708
}
0 commit comments