dgarus commented on a change in pull request #4922: IGNITE-9560
URL: https://github.com/apache/ignite/pull/4922#discussion_r273066402
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/security/SecurityContextHolder.java
 ##########
 @@ -17,44 +17,10 @@
 
 package org.apache.ignite.internal.processors.security;
 
-import org.jetbrains.annotations.Nullable;
-
 /**
- * Thread-local security context.
+ * Representation of Security Context Holder.
  */
-public class SecurityContextHolder {
-    /** Context. */
-    private static final ThreadLocal<SecurityContext> CTX = new 
ThreadLocal<>();
-
-    /**
-     * Get security context.
-     *
-     * @return Security context.
-     */
-    @Nullable public static SecurityContext get() {
-        return CTX.get();
-    }
-
-    /**
-     * Set security context.
-     *
-     * @param ctx Context.
-     * @return Old context.
-     */
-    public static SecurityContext push(@Nullable SecurityContext ctx) {
-        SecurityContext oldCtx = CTX.get();
-
-        CTX.set(ctx);
-
-        return oldCtx;
-    }
-
-    /**
-     * Pop security context.
-     *
-     * @param oldCtx Old context.
-     */
-    public static void pop(@Nullable SecurityContext oldCtx) {
-        CTX.set(oldCtx);
-    }
+public interface SecurityContextHolder extends AutoCloseable {
 
 Review comment:
   done
   the interface was removed

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to