ololo3000 commented on a change in pull request #9348:
URL: https://github.com/apache/ignite/pull/9348#discussion_r695036578



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/security/IgniteSecurityProcessor.java
##########
@@ -87,8 +84,8 @@ static boolean hasSandboxedNodes() {
         return SANDBOXED_NODES_COUNTER.get() > 0;
     }
 
-    /** Current security context. */
-    private final ThreadLocal<SecurityContext> curSecCtx = 
ThreadLocal.withInitial(this::localSecurityContext);
+    /** Current security context if differs from {@link #dfltSecCtx}. */
+    private final ThreadLocal<SecurityContext> curSecCtx = 
ThreadLocal.withInitial(() -> null);

Review comment:
       It seems that we can just use `new ThreadLocal()` here since the default 
value is null.




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