Gimini-3 opened a new pull request, #23128: URL: https://github.com/apache/kafka/pull/23128
This change makes SCRAM metadata images deeply immutable. `ScramImage` previously wrapped only the outer mechanisms map without copying it, leaving constructor aliases and nested credential maps mutable. `ScramCredentialData` also retained and exposed its `byte[]` components through constructors, accessors, and conversion methods. The change: - snapshot-copies and wraps the outer and nested mechanism maps; - defensively copies SCRAM credential arrays at construction and export boundaries; - adds regression tests covering constructor inputs, accessors, nested maps, `toRecord()`, and `toCredential()`. Related work: KAFKA-19305 mentioned `ScramImage` immutability, but PR #19847 only updated `ClientQuotaImage` and `TopicImage`. Validation: - `./gradlew :metadata:spotlessCheck` - `./gradlew :metadata:test` This contribution is my original work and I license it to the project under the project's open source license. -- 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]
