SEC-518: Fix. "Cache" in EhCache is a class, so change the APIs to use the interface it implements (Ehcache).
This commit is contained in:
@@ -17,7 +17,7 @@ package org.acegisecurity.acl.basic.cache;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import net.sf.ehcache.Cache;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
|
||||
import org.acegisecurity.MockApplicationContext;
|
||||
|
||||
@@ -56,14 +56,10 @@ public class EhCacheBasedAclEntryCacheTests extends TestCase {
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
private Cache getCache() {
|
||||
private Ehcache getCache() {
|
||||
ApplicationContext ctx = MockApplicationContext.getContext();
|
||||
|
||||
return (Cache) ctx.getBean("eHCacheBackend");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(EhCacheBasedAclEntryCacheTests.class);
|
||||
return (Ehcache) ctx.getBean("eHCacheBackend");
|
||||
}
|
||||
|
||||
public final void setUp() throws Exception {
|
||||
@@ -99,7 +95,7 @@ public class EhCacheBasedAclEntryCacheTests extends TestCase {
|
||||
assertTrue(true);
|
||||
}
|
||||
|
||||
Cache myCache = getCache();
|
||||
Ehcache myCache = getCache();
|
||||
cache.setCache(myCache);
|
||||
assertEquals(myCache, cache.getCache());
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.acegisecurity.providers.cas.cache;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import net.sf.ehcache.Cache;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
@@ -43,7 +43,6 @@ public class EhCacheBasedTicketCacheTests extends TestCase {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public EhCacheBasedTicketCacheTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
public EhCacheBasedTicketCacheTests(String arg0) {
|
||||
@@ -52,10 +51,10 @@ public class EhCacheBasedTicketCacheTests extends TestCase {
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
private Cache getCache() {
|
||||
private Ehcache getCache() {
|
||||
ApplicationContext ctx = MockApplicationContext.getContext();
|
||||
|
||||
return (Cache) ctx.getBean("eHCacheBackend");
|
||||
return (Ehcache) ctx.getBean("eHCacheBackend");
|
||||
}
|
||||
|
||||
private CasAuthenticationToken getToken() {
|
||||
@@ -70,10 +69,6 @@ public class EhCacheBasedTicketCacheTests extends TestCase {
|
||||
proxyList, "PGTIOU-0-R0zlgrl4pdAQwBvJWO3vnNpevwqStbSGcq3vKB2SqSFFRnjPHt");
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(EhCacheBasedTicketCacheTests.class);
|
||||
}
|
||||
|
||||
public final void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
@@ -106,7 +101,7 @@ public class EhCacheBasedTicketCacheTests extends TestCase {
|
||||
assertTrue(true);
|
||||
}
|
||||
|
||||
Cache myCache = getCache();
|
||||
Ehcache myCache = getCache();
|
||||
cache.setCache(myCache);
|
||||
assertEquals(myCache, cache.getCache());
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.acegisecurity.providers.dao.cache;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import net.sf.ehcache.Cache;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
@@ -38,7 +38,6 @@ public class EhCacheBasedUserCacheTests extends TestCase {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public EhCacheBasedUserCacheTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
public EhCacheBasedUserCacheTests(String arg0) {
|
||||
@@ -47,10 +46,10 @@ public class EhCacheBasedUserCacheTests extends TestCase {
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
private Cache getCache() {
|
||||
private Ehcache getCache() {
|
||||
ApplicationContext ctx = MockApplicationContext.getContext();
|
||||
|
||||
return (Cache) ctx.getBean("eHCacheBackend");
|
||||
return (Ehcache) ctx.getBean("eHCacheBackend");
|
||||
}
|
||||
|
||||
private User getUser() {
|
||||
@@ -58,10 +57,6 @@ public class EhCacheBasedUserCacheTests extends TestCase {
|
||||
new GrantedAuthority[] {new GrantedAuthorityImpl("ROLE_ONE"), new GrantedAuthorityImpl("ROLE_TWO")});
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
junit.textui.TestRunner.run(EhCacheBasedUserCacheTests.class);
|
||||
}
|
||||
|
||||
public final void setUp() throws Exception {
|
||||
super.setUp();
|
||||
}
|
||||
@@ -94,7 +89,7 @@ public class EhCacheBasedUserCacheTests extends TestCase {
|
||||
assertTrue(true);
|
||||
}
|
||||
|
||||
Cache myCache = getCache();
|
||||
Ehcache myCache = getCache();
|
||||
cache.setCache(myCache);
|
||||
assertEquals(myCache, cache.getCache());
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ package org.acegisecurity.providers.x509.cache;
|
||||
|
||||
import junit.framework.TestCase;
|
||||
|
||||
import net.sf.ehcache.Cache;
|
||||
import net.sf.ehcache.Ehcache;
|
||||
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.GrantedAuthorityImpl;
|
||||
@@ -41,7 +41,6 @@ public class EhCacheBasedX509UserCacheTests extends TestCase {
|
||||
//~ Constructors ===================================================================================================
|
||||
|
||||
public EhCacheBasedX509UserCacheTests() {
|
||||
super();
|
||||
}
|
||||
|
||||
public EhCacheBasedX509UserCacheTests(String arg0) {
|
||||
@@ -50,10 +49,10 @@ public class EhCacheBasedX509UserCacheTests extends TestCase {
|
||||
|
||||
//~ Methods ========================================================================================================
|
||||
|
||||
private Cache getCache() {
|
||||
private Ehcache getCache() {
|
||||
ApplicationContext ctx = MockApplicationContext.getContext();
|
||||
|
||||
return (Cache) ctx.getBean("eHCacheBackend");
|
||||
return (Ehcache) ctx.getBean("eHCacheBackend");
|
||||
}
|
||||
|
||||
private UserDetails getUser() {
|
||||
|
||||
Reference in New Issue
Block a user