LuciferYang opened a new issue, #13405:
URL: https://github.com/apache/gravitino/issues/13405

   ### Version
   
   main branch
   
   ### Describe what's wrong
   
   The `Map`-based `ModelVersionInfo` constructor stores the `uris` argument by 
reference, unlike the `uri`-based constructor (which null-guards) and the 
adjacent `properties` field (wrapped with `ImmutableMap.copyOf`). A null `uris` 
makes `uris()` return null while sibling accessors return empty collections, 
and `uri()` throws `NullPointerException`. The aliased map also leaves the 
event payload open to mutation by the caller after construction.
   
   ### How to reproduce
   
   Build a `ModelVersionInfo` through the map constructor with a null `uris` 
and call `uri(...)`; it throws `NullPointerException`. Alternatively, mutate 
the passed map after construction and observe the change through the event 
payload a listener receives.
   


-- 
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]

Reply via email to