jackson-databind
jackson-databind copied to clipboard
`Arrays.asList()` value deserialization has changed from mutable to immutable in 2.13
During the restructuring of the JavaUtilCollectionsDeserializers (#2900) class the type for Arrays#ArrayList was changed from modifiable to unmodifiable.
This means you can no longer call methods like List#set on the deserialized List.
Since 2.13 https://github.com/FasterXML/jackson-databind/blame/0016185419e35dc903d0098689cb00326500f054/src/main/java/com/fasterxml/jackson/databind/deser/impl/JavaUtilCollectionsDeserializers.java#L86
Before 2.13 https://github.com/FasterXML/jackson-databind/blob/2e494a9acdadb485076a3bf67b14639bcc1df9b1/src/main/java/com/fasterxml/jackson/databind/deser/impl/JavaUtilCollectionsDeserializers.java#L74
I think this would be best expressed in form of unit test, showing how mutability changed. Would it be possible to add it here -- even just couple of lines if not full test class.
Should be possible to change back in 2.14.0; looks like check is bit more general right now (anything ending with "List").
Ok, fixed. Due to low risk backported in 2.13 for 2.13.4 release.