mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-15888: change DefaultSimpleCache to initialise itself in constructor rather than using an initialising bean.
Cleaner code, no longer requires afterPropertiesSet() to be called for initialisation. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@42254 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -43,9 +43,7 @@ public class DefaultSimpleCacheTest
|
||||
@Before
|
||||
public void setUp() throws Exception
|
||||
{
|
||||
cache = new DefaultSimpleCache<Integer, String>();
|
||||
cache.setMaxItems(100);
|
||||
cache.afterPropertiesSet();
|
||||
cache = new DefaultSimpleCache<Integer, String>(100, getClass().getName());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -53,7 +51,6 @@ public class DefaultSimpleCacheTest
|
||||
{
|
||||
// We'll only keep the LAST 3 items
|
||||
cache.setMaxItems(3);
|
||||
cache.afterPropertiesSet();
|
||||
|
||||
cache.put(1, "1");
|
||||
cache.put(2, "2");
|
||||
|
Reference in New Issue
Block a user