Skip to content

Record deserialization bug/breaking change in 2.15Β #4105

@aelgn

Description

@aelgn

Search before asking

  • I searched in the issues and found nothing similar.

Describe the bug

In 2.14.x a record could be deserialized without any annotations and dummy default constructor with permissive Field visibility.
Release 2.15.x changed this behavior with I assume #3736

It was very handy to be able to deserialize records without any further ceremony.

As it stands we cannot upgrade to 2.15.x without introducing a lot of boilerplate to our records - or is there a configuration option I have missed?

Version Information

2.15.x

Reproduction

ObjectMapper mapper = new ObjectMapper().setVisibility(PropertyAccessor.FIELD, JsonAutoDetect.Visibility.ANY);
record Qwop(String q) {}
final Qwop qwop = new Qwop("");
final String s = mapper.writer().writeValueAsString(qwop);
final Qwop o = mapper.reader().forType(Qwop.class).readValue(s);

Expected behavior

Expected record deserialization to work with field visibility as in 2.14.x

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