jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r636782 - /jackrabbit/branches/1.4/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
Date Thu, 13 Mar 2008 15:19:30 GMT
Author: fmeschbe
Date: Thu Mar 13 08:19:29 2008
New Revision: 636782

URL: http://svn.apache.org/viewvc?rev=636782&view=rev
Log:
JCR-1454 NullPointerException may be thrown when trying to enumerate observation event listeners
  - check whether listeners are registered at all

Modified:
    jackrabbit/branches/1.4/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java

Modified: jackrabbit/branches/1.4/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java?rev=636782&r1=636781&r2=636782&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
Thu Mar 13 08:19:29 2008
@@ -100,7 +100,10 @@
 
     /** {@inheritDoc} */
     public EventListenerIterator getRegisteredEventListeners() {
-        return new ArrayEventListenerIterator(poller.getListeners());
+        EventListener[] listeners = (poller != null)
+                ? poller.getListeners()
+                : new EventListener[0];
+        return new ArrayEventListenerIterator(listeners);
     }
 
     //---------- internal ------------------------------------------------------



Mime
View raw message