Reputation: 12692
Would adding / removing a final modifier on a field affect Java serialization?
I saw in the java serialization specification that changing the access to a field is a compatible change. But there is no mention of the final
modifier, either in the "Incompatible changes" or the "Compatible changes" section.
Is this a compatible change?
Upvotes: 2
Views: 99
Reputation: 7928
As long as you were not changing the value of the field yes, it is compatible.
Upvotes: 3