LuciferYang opened a new pull request, #13406: URL: https://github.com/apache/gravitino/pull/13406
### What changes were proposed in this pull request? The `Map`-based `ModelVersionInfo` constructor now stores `uris` as `Collections.emptyMap()` when the argument is null and `ImmutableMap.copyOf(uris)` otherwise, matching the `uri`-based constructor and the adjacent `properties` field. ### Why are the changes needed? The constructor stored `uris` by reference, so a null `uris` made `uris()` return null (while siblings return empty) and `uri()` throw `NullPointerException`, and the aliased map exposed the event payload to later mutation by the caller. Fix: #13405 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Added `TestModelVersionInfo.testNullUrisYieldEmptyMap` and `testUrisAreDefensivelyCopied`, pinning the null handling and the defensive copy. They fail against the pre-fix code. -- 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]
