Author: manik.surtani(a)jboss.com
Date: 2008-07-30 19:54:23 -0400 (Wed, 30 Jul 2008)
New Revision: 6452
Modified:
core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java
core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java
Log:
Added null chk
Modified: core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java 2008-07-30
23:52:09 UTC (rev 6451)
+++ core/trunk/src/main/java/org/jboss/cache/loader/CacheLoaderManager.java 2008-07-30
23:54:23 UTC (rev 6452)
@@ -451,7 +451,8 @@
{
throw new CacheException("Unable to start cache loaders", e);
}
- fetchPersistentState |= loader.getConfig().isFetchPersistentState();
+ fetchPersistentState = fetchPersistentState || (loader.getConfig() != null
&& loader.getConfig().isFetchPersistentState());
+ fetchPersistentState = fetchPersistentState || (config != null &&
config.isFetchPersistentState());
}
}
Modified: core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java 2008-07-30
23:52:09 UTC (rev 6451)
+++ core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderTestsBase.java 2008-07-30
23:54:23 UTC (rev 6452)
@@ -88,7 +88,7 @@
public void tearDown() throws Exception
{
cleanup();
- loader.remove(Fqn.ROOT);
+ if (loader != null) loader.remove(Fqn.ROOT);
TestingUtil.killCaches(cache);
}