joonseolee opened a new pull request, #8021: URL: https://github.com/apache/gravitino/pull/8021
### What changes were proposed in this pull request? This PR adds a null check for the updates field in ModelVersionUpdateRequest.validate(). If updates is null, the method now throws an IllegalArgumentException with a clear message instead of triggering a NullPointerException. This ensures that validation fails gracefully when no updates are provided. ### Why are the changes needed? Previously, when updates was null, calling updates.forEach(...) would result in a NullPointerException, which is less informative and harder to debug. By explicitly checking for null and throwing IllegalArgumentException, the code provides a clear error message and prevents unexpected runtime failures. Fix: #8009 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Added a test to verify that validate() throws IllegalArgumentException when updates is null. -- 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]
