geniusjun opened a new pull request, #10190:
URL: https://github.com/apache/gravitino/pull/10190

   Summary
   - Added an explicit null check for `StatisticsUpdateRequest` in 
`StatisticOperations.updateStatistics(...)`
   - Returned a proper client error (`IllegalArgumentException` -> `400 
BAD_REQUEST`) for null request bodies
   - Made error handling null-safe to avoid a secondary NPE in the catch path
   - Refactored request validation/statistic-name extraction into helper 
methods for readability
   - Added a regression test for `PUT /statistics` with JSON `null` body
   
   Verification
   - Ran:
     `export JAVA_HOME=$(/usr/libexec/java_home -v 17); ./gradlew :server:test 
--tests org.apache.gravitino.server.web.rest.TestStatisticOperations -PskipITs`
   - `TestStatisticOperations` passed locally
   
   Fix: #10125
   
   Feedback and suggestions are very welcome. Thank you!
   


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