Skip to content

Commit

Permalink
Exception when deserialization of private record with default const…
Browse files Browse the repository at this point in the history
…ructor (fix for #4175) (#4178)
  • Loading branch information
JooHyukKim authored Oct 27, 2023
1 parent 3a0991c commit 132c969
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ Project: jackson-databind
(fix contributed by Jonas K)
#4159: Add new `DefaultTyping.NON_FINAL_AND_ENUMS` to allow Default Typing for `Enum`s
(contributed by Joo-Hyuk K)
#4175: Exception when deserialization of private record with default constructor
(reported by Jan P)
(contributed by Joo-Hyuk K)

2.15.4 (not yet released)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,8 @@ public final VisibilityChecker<?> getDefaultVisibilityChecker(Class<?> baseType,
if (ClassUtil.isRecordType(baseType)) {
// But only if creator auto-detection enabled:
if (isEnabled(MapperFeature.AUTO_DETECT_CREATORS)) {
vc = vc.withCreatorVisibility(Visibility.NON_PRIVATE);
// [databind#4175] Changed Visibility from NON_PRIVATE to DEFAULT since 2.16
vc = vc.withCreatorVisibility(Visibility.DEFAULT);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.fasterxml.jackson.databind.failing;
package com.fasterxml.jackson.databind.jdk17;

import java.util.Collections;

Expand Down

0 comments on commit 132c969

Please sign in to comment.