Skip to content

Breaking change in `InstantDeserializer API between 2.15 and 2.16 #286

Closed
@haraldk

Description

@haraldk

Version 2.16 seems to have introduced a breaking change in the API for InstantDeserializer.

Since 6 years ago…. And up until 2.15, the InstantDeserializer constructor looked like this:

    protected InstantDeserializer(Class<T> supportedType,
            DateTimeFormatter formatter,
            Function<TemporalAccessor, T> parsedToValue,
            Function<FromIntegerArguments, T> fromMilliseconds,
            Function<FromDecimalArguments, T> fromNanoseconds,
            BiFunction<T, ZoneId, T> adjust,
            boolean replaceZeroOffsetAsZ)

However, since 2.16 and onwards, it was changed to this:

    protected InstantDeserializer(Class<T> supportedType,
            DateTimeFormatter formatter,
            Function<TemporalAccessor, T> parsedToValue,
            Function<FromIntegerArguments, T> fromMilliseconds,
            Function<FromDecimalArguments, T> fromNanoseconds,
            BiFunction<T, ZoneId, T> adjust,
            boolean replaceZeroOffsetAsZ,
            boolean normalizeZoneId,
            boolean readNumericStringsAsTimestamp
    )

Two new boolean parameters added.

This breaks our custom subclass, that no longer finds it super constructor. To make things worse for us, the subclass is shared between multiple projects, that use different versions of Jackson, so we can't just upgrade and fix it for the latest version...

Can we have the old version (with defaults for the missing parameters) back, please. 😀

If you like, I can make a PR, I just need to figure out what the defaults should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions