On JDK 26, SaleToAcquirerDataSerializerTest emits this warning while Gson deserializes terminal application info:
WARNING: Final field adyenLibrary in class com.adyen.model.applicationinfo.ApplicationInfo has been mutated reflectively by class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory...
WARNING: Mutating final fields will be blocked in a future release unless final field mutation is enabled
ApplicationInfo initializes adyenLibrary in its no-argument constructor, but Gson then populates the JSON value reflectively. The field being final therefore does not prevent mutation today; it only invokes deep reflection that modern JDKs are restricting (JEP 500): https://openjdk.org/jeps/500
This code is used by terminal SaleToAcquirerData serialization/deserialization. Applications should not need --enable-final-field-mutation=ALL-UNNAMED for ordinary SDK model handling.
Proposed fix: make this serialized field non-final, matching the rest of the Gson model. The public API remains unchanged (getAdyenLibrary() remains read-only).
Verification: the focused round-trip serialization test passes without the final-field warning, and the full 617-test suite passes on JDK 26.
On JDK 26,
SaleToAcquirerDataSerializerTestemits this warning while Gson deserializes terminal application info:ApplicationInfoinitializesadyenLibraryin its no-argument constructor, but Gson then populates the JSON value reflectively. The field beingfinaltherefore does not prevent mutation today; it only invokes deep reflection that modern JDKs are restricting (JEP 500): https://openjdk.org/jeps/500This code is used by terminal
SaleToAcquirerDataserialization/deserialization. Applications should not need--enable-final-field-mutation=ALL-UNNAMEDfor ordinary SDK model handling.Proposed fix: make this serialized field non-final, matching the rest of the Gson model. The public API remains unchanged (
getAdyenLibrary()remains read-only).Verification: the focused round-trip serialization test passes without the final-field warning, and the full 617-test suite passes on JDK 26.