Author: alessandrolt
Date: 2012-03-08 11:06:25 -0500 (Thu, 08 Mar 2012)
New Revision: 21020
Modified:
core/patches/hibernate-3.3.2.GA_CP04_JBPAPP-8371/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/timestamp/TimestampsRegionImpl.java
Log:
JBPAPP-8371 - the revision 17811 of BasicRegionAdapter (which is parent of
TimestampsRegionImpl) added itself as cache listener by the line 102
(this.jbcCache.addCacheListener(this)) in its constructor. As TimestampsRegionImpl calls
its parent construtor, the listener is initialized and the event "nodeModified"
is called, but the localcache attribute was not initialized yet, so a NPE is throwed. A
simple NULL check avoids that
Modified:
core/patches/hibernate-3.3.2.GA_CP04_JBPAPP-8371/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/timestamp/TimestampsRegionImpl.java
===================================================================
---
core/patches/hibernate-3.3.2.GA_CP04_JBPAPP-8371/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/timestamp/TimestampsRegionImpl.java 2012-03-08
15:04:29 UTC (rev 21019)
+++
core/patches/hibernate-3.3.2.GA_CP04_JBPAPP-8371/cache-jbosscache2/src/main/java/org/hibernate/cache/jbc2/timestamp/TimestampsRegionImpl.java 2012-03-08
16:06:25 UTC (rev 21020)
@@ -160,7 +160,7 @@
Fqn fqn = event.getFqn();
Fqn regFqn = getRegionFqn();
- if (fqn.size() == regFqn.size() + 1 && fqn.isChildOf(regFqn)) {
+ if (localCache != null && fqn.size() == regFqn.size() + 1 &&
fqn.isChildOf(regFqn)) {
Object key = fqn.get(regFqn.size());
localCache.put(key, event.getData().get(ITEM));
}
Show replies by date