jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r633796 - /jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
Date Wed, 05 Mar 2008 09:08:36 GMT
Author: fmeschbe
Date: Wed Mar  5 01:08:33 2008
New Revision: 633796

URL: http://svn.apache.org/viewvc?rev=633796&view=rev
Log:
JCR-1454 Prevent NPE on enumerating event listeners if none have been registered yet

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

Modified: jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java?rev=633796&r1=633795&r2=633796&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-rmi/src/main/java/org/apache/jackrabbit/rmi/client/ClientObservationManager.java
Wed Mar  5 01:08:33 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