Skip to content

Commit 78702a3

Browse files
committed
Fix #4552: MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS defaults to false
1 parent 1c213ac commit 78702a3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

release-notes/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Versions: 3.x (for earlier see VERSION-2.x)
5757
#3601: Change `Optional` deserialization from "absent" value into `null`, from "empty"
5858
#4160: Deprecate `DefaultTyping.EVERYTHING` in `2.x` and remove in `3.0`
5959
#4381: Prevent construction of `null`-valued `JsonNode`s (like `TextNode`)
60+
#4552: Change `MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS` default to `false` for 3.0
6061
- Remove `MappingJsonFactory`
6162
- Add context parameter for `TypeSerializer` contextualization (`forProperty()`)
6263
- Default for `JsonNodeFeature.STRIP_TRAILING_BIGDECIMAL_ZEROES` changed to `false` for 3.0

src/main/java/tools/jackson/databind/MapperFeature.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ public enum MapperFeature
7878
* rules; if disabled, such fields are NOT used as mutators except if
7979
* explicitly annotated for such use.
8080
*<p>
81-
* Feature is enabled by default, for backwards compatibility reasons.
81+
* Feature is disabled by default in Jackson 3.x, in 2.x it was enabled by default.
8282
*/
83-
ALLOW_FINAL_FIELDS_AS_MUTATORS(true),
83+
ALLOW_FINAL_FIELDS_AS_MUTATORS(false),
8484

8585
/**
8686
* Feature that determines whether member mutators (fields and

0 commit comments

Comments
 (0)