sabashaikh4 commented on code in PR #9854:
URL: https://github.com/apache/gravitino/pull/9854#discussion_r2762547608


##########
core/src/main/java/org/apache/gravitino/listener/api/event/ListTopicFailureEvent.java:
##########
@@ -39,10 +40,15 @@ public final class ListTopicFailureEvent extends 
TopicFailureEvent {
    * @param exception The exception encountered during the attempt to list 
topics.
    */
   public ListTopicFailureEvent(String user, Namespace namespace, Exception 
exception) {
-    super(user, NameIdentifier.of(namespace.levels()), exception);

Review Comment:
   @jerryshao Thanks for the clarification.
   Since Java requires super() to be the first statement, I moved the null 
validation into a helper method (toNameIdentifier()), which is invoked from the 
super() call. This ensures the namespace is validated before namespace.levels() 
is accessed, and avoids the NPE.
   
   I've updated the code accordingly, and all tests are passing now. Please let 
me know if this approach looks good to 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