[jboss-cvs] JBossCache/src/org/jboss/cache/pojo/impl ...
Jason Thomas Greene
jgreene at jboss.com
Mon Jul 2 21:32:25 EDT 2007
User: jgreene
Date: 07/07/02 21:32:25
Modified: src/org/jboss/cache/pojo/impl CacheListenerAdaptor.java
Log:
Fix NPE
Revision Changes Path
1.8 +8 -1 JBossCache/src/org/jboss/cache/pojo/impl/CacheListenerAdaptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheListenerAdaptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/pojo/impl/CacheListenerAdaptor.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- CacheListenerAdaptor.java 29 Jun 2007 04:34:01 -0000 1.7
+++ CacheListenerAdaptor.java 3 Jul 2007 01:32:25 -0000 1.8
@@ -60,7 +60,7 @@
import org.jboss.cache.pojo.notification.event.TransactionCompletedEvent;
import org.jboss.cache.pojo.notification.event.TransactionRegisteredEvent;
-// $Id: CacheListenerAdaptor.java,v 1.7 2007/06/29 04:34:01 jgreene Exp $
+// $Id: CacheListenerAdaptor.java,v 1.8 2007/07/03 01:32:25 jgreene Exp $
/**
* Adapts the core cache listener API into the POJO listener API.
@@ -101,6 +101,10 @@
value = cache.find(((PojoReference) value).getFqn().toString());
Object o = cache.find(fqn.toString());
+ // Detached
+ if (o == null)
+ return null;
+
Field f;
try
{
@@ -135,6 +139,9 @@
private void sendNotification(Event notification, Set<NotificationDispatcher.Entry> listeners)
{
+ if (notification == null)
+ return;
+
if (listeners == null)
dispatcher.dispatch(notification);
else
More information about the jboss-cvs-commits
mailing list