Polish Memory Leak Mitigation
Issue gh-9841
This commit is contained in:
-5
@@ -44,11 +44,6 @@ final class GlobalSecurityContextHolderStrategy implements SecurityContextHolder
|
||||
return contextHolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecurityContext peekContext() {
|
||||
return contextHolder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContext(SecurityContext context) {
|
||||
Assert.notNull(context, "Only non-null SecurityContext instances are permitted");
|
||||
|
||||
-5
@@ -44,11 +44,6 @@ final class InheritableThreadLocalSecurityContextHolderStrategy implements Secur
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecurityContext peekContext() {
|
||||
return contextHolder.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContext(SecurityContext context) {
|
||||
Assert.notNull(context, "Only non-null SecurityContext instances are permitted");
|
||||
|
||||
-8
@@ -123,14 +123,6 @@ public class SecurityContextHolder {
|
||||
return strategy.getContext();
|
||||
}
|
||||
|
||||
/**
|
||||
* Peeks the current <code>SecurityContext</code>.
|
||||
* @return the security context (may be <code>null</code>)
|
||||
*/
|
||||
public static SecurityContext peekContext() {
|
||||
return strategy.peekContext();
|
||||
}
|
||||
|
||||
/**
|
||||
* Primarily for troubleshooting purposes, this method shows how many times the class
|
||||
* has re-initialized its <code>SecurityContextHolderStrategy</code>.
|
||||
|
||||
-6
@@ -38,12 +38,6 @@ public interface SecurityContextHolderStrategy {
|
||||
*/
|
||||
SecurityContext getContext();
|
||||
|
||||
/**
|
||||
* Peeks the current context without creating an empty context.
|
||||
* @return a context (may be <code>null</code>)
|
||||
*/
|
||||
SecurityContext peekContext();
|
||||
|
||||
/**
|
||||
* Sets the current context.
|
||||
* @param context to the new argument (should never be <code>null</code>, although
|
||||
|
||||
-5
@@ -45,11 +45,6 @@ final class ThreadLocalSecurityContextHolderStrategy implements SecurityContextH
|
||||
return ctx;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecurityContext peekContext() {
|
||||
return contextHolder.get();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContext(SecurityContext context) {
|
||||
Assert.notNull(context, "Only non-null SecurityContext instances are permitted");
|
||||
|
||||
Reference in New Issue
Block a user