gnodet opened a new pull request, #26671: URL: https://github.com/apache/camel/pull/26671
## Summary Fixes a serialization regression introduced in #26467. ### Problem Resolving constant names (e.g. `AES_256_GCM`) to W3C URIs eagerly in the four setters (`setXmlCipherAlgorithm`, `setKeyCipherAlgorithm`, `setDigestAlgorithm`, `setMgfAlgorithm`) caused a round-trip serialization regression: the `ModelWriter` compares getters against the constant-name defaults (e.g. `"AES_256_GCM"`) to decide whether to suppress the attribute in the marshalled XML. After eager resolution, getters always returned W3C URIs, so the equality check never matched and all four algorithm attributes were written unconditionally in all routes — breaking round-trip serialization for any route using the default values. ### Fix Remove `resolveAlgorithm()` from the four setters so getters return what was originally set. Add private `resolvedXxx()` helpers that apply `resolveAlgorithm()` lazily, and use those helpers at every actual crypto call-site (marshal/unmarshal path). This was caught during review of the `camel-4.22.x` backport PR #26486. ### Tests `XmlSecurityConstantNameTest` updated: the getter-assertion `assertEquals(XMLCipher.AES_256_GCM, df.getXmlCipherAlgorithm())` checked eager resolution and is removed; the end-to-end encrypt/decrypt at the bottom of each test method validates that lazy resolution works correctly at actual crypto call-sites. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
