Skip to content

field detection regression between Jackson 2.8 and 2.9 #1972

@hgschmie

Description

@hgschmie

Using this test code: https://github.com/airlift/airlift/blob/master/json/src/test/java/io/airlift/json/TestJsonModule.java#L101-L110

which explicitly tests that in an object mapper that has all autodetection disabled: https://github.com/airlift/airlift/blob/master/json/src/main/java/io/airlift/json/ObjectMapperProvider.java#L107-L130

This test passes with Jackson 2.8. With Jackson 2.9, it reports

[ERROR] testFieldDetection(io.airlift.json.TestJsonModule) Time elapsed: 0.007 s <<< FAILURE!
java.lang.AssertionError: Sets differ: expected [make, model, year, purchased, nameList] but got [make, model, year, purchased, notes, nameList]
at io.airlift.json.TestJsonModule.testFieldDetection(TestJsonModule.java:109)

So the field, that is supposed to not-detected by Jackson is detected by 2.9 (but not by 2.8). I tested with 2.8.1 (passes), 2.8.11 (passes), 2.9.0 (fails) and 2.9.4 (fails).

Looking through the release notes I did not find anything that would explain this behavior (or how to turn it off), so I consider that an actual regression.

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