justinmclean commented on code in PR #10135:
URL: https://github.com/apache/gravitino/pull/10135#discussion_r2886370679


##########
core/src/main/java/org/apache/gravitino/listener/api/event/AlterFilesetFailureEvent.java:
##########
@@ -45,7 +45,7 @@ public final class AlterFilesetFailureEvent extends 
FilesetFailureEvent {
   public AlterFilesetFailureEvent(
       String user, NameIdentifier identifier, Exception exception, 
FilesetChange[] filesetChanges) {
     super(user, identifier, exception);
-    this.filesetChanges = filesetChanges.clone();
+    this.filesetChanges = filesetChanges == null ? null : 
filesetChanges.clone();

Review Comment:
   That's only partially true. In the REST path, changes are indeed non-null. 
But AlterFilesetFailureEvent is not REST-specific. It is built in a generic 
dispatcher (see FilesetEventDispatcher.java) from varargs FilesetChange... 
changes.
   
   Java varargs can be called with a null array (e.g. alterFileset(ident, 
(FilesetChange[]) null)), and the API does notenforce non-null (see 
FilesetCatalog.java)



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