gravitino icon indicating copy to clipboard operation
gravitino copied to clipboard

[#9122] [Improvement]: Prevent potential null pointer error in MetadataObjectStatisticsOperations.java

Open Pikady opened this issue 1 month ago • 0 comments

What changes were proposed in this pull request?

  • Add argument validation in MetadataObjectStatisticsOperations#dropStatistics to throw IllegalArgumentException when the list is null or empty.
  • Extend unit tests to assert null/empty list behavior.

Why are the changes needed?

  • Prevents potential NullPointerException and provides clearer error feedback to callers.

Fix: #9122

Does this PR introduce any user-facing change?

  • dropStatistics(null | empty) now throws IllegalArgumentException (null input previously could cause NPE).

How was this patch tested?

  • Unit tests added for null and empty list inputs.

Pikady avatar Nov 16 '25 11:11 Pikady