Hi there, I'm experience a strange behavior when working with Jackson (v2.11.0) when working with final fields. I have a POJO with some final fields, which I want to NOT be modifiable during deserialization. It seems to be working as expected for primitive type, but not for objects.
I have created this gist to demonstrate the issue: https://gist.github.com/Plonk42/82409983a684b44df6a564acc43a7d75 The output of this gist is: 1. {"myField":42,"bucket":{"bucketField":42}} 2. myField: 42, bucketField:100 3. {"myField":100,"bucket":{"bucketField":100}} On line 1., the output is what we expect (both fields set to 42). Then I'm de-serializing a JSON payload representing a POJO, and we see the first strange thing: "myField" is not modified (still 42) but "bucketField" is modified (now 100). Then serializing again the resulting POJO, it gets even stranger: now both fields are set to 100. Am I missing something?? Thanks, Clément -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/0308f555-e623-40fa-82b3-39f8913616f0%40googlegroups.com.
