jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1453359 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/core/ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/
Date Wed, 06 Mar 2013 14:56:48 GMT
Author: mreutegg
Date: Wed Mar  6 14:56:47 2013
New Revision: 1453359

URL: http://svn.apache.org/r1453359
Log:
OAK-677: Property events on root node fail with NPE

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeFilter.java
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java?rev=1453359&r1=1453358&r2=1453359&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ReadOnlyTree.java
Wed Mar  6 14:56:47 2013
@@ -51,7 +51,7 @@ public class ReadOnlyTree implements Tre
      */
     private final NodeState state;
 
-    public ReadOnlyTree(NodeState rootState) {
+    public ReadOnlyTree(@Nonnull NodeState rootState) {
         this(null, "", rootState);
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeFilter.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeFilter.java?rev=1453359&r1=1453358&r2=1453359&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeFilter.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeFilter.java
Wed Mar  6 14:56:47 2013
@@ -61,10 +61,11 @@ class ChangeFilter {
         this.noLocal = noLocal;
     }
 
-    public boolean include(int eventType, String path, NodeState associatedParentNode) {
+    public boolean include(int eventType, String path, @Nullable NodeState associatedParentNode)
{
         return include(eventType)
                 && include(path)
-                && includeByType(new ReadOnlyTree(associatedParentNode));
+                && (associatedParentNode == null
+                    || includeByType(new ReadOnlyTree(associatedParentNode)));
     }
 
     public boolean includeChildren(String path) {

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1453359&r1=1453358&r2=1453359&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Wed Mar  6 14:56:47 2013
@@ -2072,7 +2072,6 @@ public class RepositoryTest extends Abst
     }
 
     @Test
-    @Ignore("OAK-677")
     public void observationOnRootNode() throws Exception {
         final AtomicReference<CountDownLatch> hasEvents = new AtomicReference<CountDownLatch>(new
CountDownLatch(1));
         Session observingSession = createAdminSession();



Mime
View raw message