@@ -48,22 +48,23 @@ public enum Feature implements FormatFeature
4848 DECODE_USING_STANDARD_NEGATIVE_BIGINT_ENCODING (false ),
4949
5050 /**
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.
5253 * <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
5556 * {@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) .
5960 *
6061 * @since 2.20
6162 */
62- HANDLE_UNDEFINED_AS_EMBEDDED_OBJECT (false )
63+ READ_UNDEFINED_AS_EMBEDDED_OBJECT (false )
6364 ;
6465
65- final boolean _defaultState ;
66- final int _mask ;
66+ private final boolean _defaultState ;
67+ private final int _mask ;
6768
6869 /**
6970 * Method that calculates bit set (flags) of all features that
@@ -206,7 +207,7 @@ public int getFirstTag() {
206207 * @since 2.20
207208 */
208209 protected int _formatFeatures ;
209-
210+
210211 /**
211212 * Codec used for data binding when (if) requested.
212213 */
@@ -1933,7 +1934,7 @@ private final byte[] _getBinaryFromString(Base64Variant variant) throws IOExcept
19331934 * Checking whether the current token represents an `undefined` value (0xF7).
19341935 * <p>
19351936 * 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
19371938 * and the token is reported as {@link JsonToken#VALUE_NULL}.
19381939 *
19391940 * @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)
36943695 * as {@link JsonToken#VALUE_NULL} by default.
36953696 * <p>
36963697 *
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,
36983699 * the value will instead be decoded as {@link JsonToken#VALUE_EMBEDDED_OBJECT}
36993700 * with an embedded value of {@code null}.
37003701 *
37013702 * @since 2.10
37023703 */
37033704 protected JsonToken _decodeUndefinedValue () {
3704- if (Feature .HANDLE_UNDEFINED_AS_EMBEDDED_OBJECT .enabledIn (_formatFeatures )) {
3705+ if (Feature .READ_UNDEFINED_AS_EMBEDDED_OBJECT .enabledIn (_formatFeatures )) {
37053706 _binaryValue = null ; // should be clear but just in case
37063707 return JsonToken .VALUE_EMBEDDED_OBJECT ;
37073708 }
0 commit comments