SEC-291: Avoid unnecessary creation of SecurityContextHolderStrategy.

This commit is contained in:
Ben Alex
2006-06-01 14:02:56 +00:00
parent da780e4567
commit f7020755be
2 changed files with 28 additions and 18 deletions

View File

@@ -240,8 +240,8 @@ public class SecurityContextHolderTests extends TestCase {
public void testSynchronizationCustomStrategyLoading() {
SecurityContextHolder.setStrategyName(InheritableThreadLocalSecurityContextHolderStrategy.class.getName());
assertEquals("SecurityContextHolder[strategy='org.acegisecurity.context.InheritableThreadLocalSecurityContextHolderStrategy']",
new SecurityContextHolder().toString());
assertTrue(new SecurityContextHolder().toString()
.lastIndexOf("SecurityContextHolder[strategy='org.acegisecurity.context.InheritableThreadLocalSecurityContextHolderStrategy'") != -1);
loadStartAndWaitForThreads(true, "Main_", 10, false, true);
assertEquals("Thread errors detected; review log output for details", 0, errors);
}