From 5c8e41c54a945af0f984378e3d70acd13acbe8a5 Mon Sep 17 00:00:00 2001 From: Jonas Partner Date: Fri, 20 Jun 2008 14:29:56 +0000 Subject: [PATCH] removed Java 1.6 calls to pop and push --- .../security/StackBasedSecurityContextHolderStrategy.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/org.springframework.integration.security/src/main/java/org/springframework/integration/security/StackBasedSecurityContextHolderStrategy.java b/org.springframework.integration.security/src/main/java/org/springframework/integration/security/StackBasedSecurityContextHolderStrategy.java index 3cf3516afe..8ef727f1b9 100644 --- a/org.springframework.integration.security/src/main/java/org/springframework/integration/security/StackBasedSecurityContextHolderStrategy.java +++ b/org.springframework.integration.security/src/main/java/org/springframework/integration/security/StackBasedSecurityContextHolderStrategy.java @@ -39,7 +39,7 @@ public class StackBasedSecurityContextHolderStrategy implements SecurityContextH public void clearContext() { if (getStackForThread().size() > 0) { - SecurityContext ctx = getStackForThread().pop(); + SecurityContext ctx = getStackForThread().poll(); logger.debug("Popped security context " + ctx); } } @@ -47,7 +47,7 @@ public class StackBasedSecurityContextHolderStrategy implements SecurityContextH public SecurityContext getContext() { if (getStackForThread().peek() == null) { logger.debug("Pushed new blank security context"); - getStackForThread().push(new SecurityContextImpl()); + getStackForThread().offer(new SecurityContextImpl()); } return (SecurityContext) getStackForThread().peek(); @@ -56,7 +56,7 @@ public class StackBasedSecurityContextHolderStrategy implements SecurityContextH public void setContext(SecurityContext context) { Assert.notNull(context, "Only non-null SecurityContext instances are permitted"); - getStackForThread().push(context); + getStackForThread().offer(context); logger.debug("Pushed context " + context); }