Transient Field
s are not ignored as Mutators if there is visible Getter
#3682
Milestone
Field
s are not ignored as Mutators if there is visible Getter
#3682
Looks like
transient
Fields are only ignored in cases if there is no explicit or just visible accessors, and as such Field like this:would actually try to use field
size
for setting value during deserialization. WithoutgetSize()
it would, however, be dropped despite being visible otherwise.While this is not often problem with POJOs it is problematic with many JDK types (and probably some 3rd party libraries); and intent was never to "pull in" such Fields. It does, for example, break handling of
LinkedList
for JDK 17 and above, in cases where it (or sub-class) is to be serialized "as POJO".So, for 2.15 let's prune these Fields.
The text was updated successfully, but these errors were encountered: