diff --git a/datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java b/datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java index e52b585f..bc16044c 100644 --- a/datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java +++ b/datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java @@ -153,6 +153,9 @@ public class InstantDeserializer */ protected final boolean _alwaysAllowStringifiedDateTimestamps; + /** + * @since 2.16 + */ protected InstantDeserializer(Class supportedType, DateTimeFormatter formatter, Function parsedToValue, @@ -176,6 +179,24 @@ protected InstantDeserializer(Class supportedType, _alwaysAllowStringifiedDateTimestamps = readNumericStringsAsTimestamp; } + /** + * @deprecated Since 2.16, use {@link #InstantDeserializer(Class,DateTimeFormatter, + * Function,Function,Function,BiFunction,boolean,boolean,boolean)} instead. + */ + @Deprecated() + protected InstantDeserializer(Class supportedType, + DateTimeFormatter formatter, + Function parsedToValue, + Function fromMilliseconds, + Function fromNanoseconds, + BiFunction adjust, + boolean replaceZeroOffsetAsZ + ) { + this(supportedType, formatter, parsedToValue, fromMilliseconds, fromNanoseconds, + adjust, replaceZeroOffsetAsZ, + DEFAULT_NORMALIZE_ZONE_ID, DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS); + } + @SuppressWarnings("unchecked") protected InstantDeserializer(InstantDeserializer base, DateTimeFormatter f) { diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index 1fdeb01e..244e837d 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -185,3 +185,8 @@ M.P. Korstanje (mpkorstanje@github) * Contributed #263: Add `JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_TIMESTAMPS` to allow parsing quoted numbers when using a custom DateTimeFormatter (2.16.0) + +Harald Kuhr (haraldk@github) + * Reported #286: Breaking change in `InstantDeserializer API between 2.15 and 2.16 + (2.16.1) + diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index 7b22977f..e367151e 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -10,6 +10,8 @@ Modules: 2.16.1 (not yet released) +#286: Breaking change in `InstantDeserializer API between 2.15 and 2.16 + (reported by Harald K) #288: `LocalDateTime` serialization issue with custom-configured `LocalDateTimeSerializer` (reported by @mklinkj)