File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
nucleus/security/core/src/main/java/com/sun/enterprise/security Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,15 @@ public class SecurityContext extends AbstractSecurityContext {
6666
6767 private static final long serialVersionUID = 1L ;
6868 private static final Logger _logger = SecurityLoggerInfo .getLogger ();
69+ // sessionPrincipal is static because it's a thread local, which isn't serializable,
70+ // and we need at most one instance per thread
71+ private static final ThreadLocal <Principal > sessionPrincipal = new ThreadLocal <>();
6972
7073 private static InheritableThreadLocal <SecurityContext > currentSecurityContext = new InheritableThreadLocal <>();
7174 private static SecurityContext defaultSecurityContext = generateDefaultSecurityContext ();
7275
7376 private static AuthPermission doAsPrivilegedPerm = new AuthPermission ("doAsPrivileged" );
7477
75- // this is static because it's a thread local, which isn't serializable
76- private static ThreadLocal <Principal > sessionPrincipal = new ThreadLocal <>();
77-
7878 // Did the client log in as or did the server generate the context
7979 private boolean serverGeneratedSecurityContext ;
8080
You can’t perform that action at this time.
0 commit comments