github-actions[bot] opened a new pull request, #8568: URL: https://github.com/apache/gravitino/pull/8568
### What changes were proposed in this pull request? Add null check precondition to `PartitionStatisticsListResponse.validate()` method to prevent NullPointerException when the partition statistics array contains null elements. The fix ensures that each partition statistic is validated for null before calling its `validate()` method. ### Why are the changes needed? * The `PartitionStatisticsListResponse.validate()` method was vulnerable to NPE when iterating through partition statistics array * If the array contained null elements, calling `partitionStat.validate()` would throw NullPointerException * The existing code only checked if the array itself was null, but not individual elements * This created a potential runtime failure that should be caught with proper validation Fix: #8350 ### Does this PR introduce _any_ user-facing change? No, this is a defensive programming improvement. The change prevents potential NPE by adding proper validation, but does not change the external API or behavior for valid inputs. ### How was this patch tested? * Added comprehensive test case `testPartitionStatisticsListResponseNullElement()` to verify null elements trigger `IllegalArgumentException` * Existing unit tests continue to pass, ensuring no functional regression * Local testing completed successfully with Gradle build and Spotless formatting * All common module tests compile and run successfully * RAT license audit passes without issues -- 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]
