Add null check for identityCacheConfig object
@@ -60,13 +60,15 @@ public class BaseCache<K extends Serializable, V extends Serializable> {
public BaseCache(String cacheName, boolean isTemp) {
this.cacheName = cacheName;
IdentityCacheConfig identityCacheConfig = IdentityUtil.getIdentityCacheConfig(CACHE_MANAGER_NAME, cacheName);
- if (identityCacheConfig != null && !identityCacheConfig.isDistributed()) {
+ if (identityCacheConfig != null) {
+ if (!identityCacheConfig.isDistributed()) {
this.cacheName = CachingConstants.LOCAL_CACHE_PREFIX + cacheName;
}
-
identityCacheConfig.setTemporary(isTemp);
}
+ }
+
private Cache<K, V> getBaseCache() {
Cache<K, V> cache = null;
