jerqi commented on code in PR #3852:
URL: https://github.com/apache/gravitino/pull/3852#discussion_r1685926668


##########
core/src/main/java/org/apache/gravitino/utils/PrincipalUtils.java:
##########
@@ -44,13 +44,19 @@ public static <T> T doAs(Principal principal, 
PrivilegedExceptionAction<T> actio
     }
   }
 
+  // This method can't be used in nested `Subject#doAs` block.
   public static Principal getCurrentPrincipal() {
     java.security.AccessControlContext context = 
java.security.AccessController.getContext();
     Subject subject = Subject.getSubject(context);
-    if (subject == null || 
subject.getPrincipals(UserPrincipal.class).isEmpty()) {

Review Comment:
   Why do you change this?



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