jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1341815 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
Date Wed, 23 May 2012 10:05:46 GMT
Author: mduerig
Date: Wed May 23 10:05:46 2012
New Revision: 1341815

URL: http://svn.apache.org/viewvc?rev=1341815&view=rev
Log:
OAK-110: NPE in KernelNodeStoreBranch.diffToJsop
- don't call diff handler for cancelling changes (i.e. remove of transiently added item)

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java?rev=1341815&r1=1341814&r2=1341815&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/ModifiedNodeState.java
Wed May 23 10:05:46 2012
@@ -52,7 +52,9 @@ public class ModifiedNodeState extends P
             PropertyState before = super.getProperty(entry.getKey());
             PropertyState after = entry.getValue();
             if (before == null) {
-                diff.propertyAdded(after);
+                if (after != null) {
+                    diff.propertyAdded(after);
+                }
             } else if (after == null) {
                 diff.propertyDeleted(before);
             } else {
@@ -65,7 +67,9 @@ public class ModifiedNodeState extends P
             NodeState before = super.getChildNode(name);
             NodeState after = entry.getValue();
             if (before == null) {
-                diff.childNodeAdded(name, after);
+                if (after != null) {
+                    diff.childNodeAdded(name, after);
+                }
             } else if (after == null) {
                 diff.childNodeDeleted(name, before);
             } else {



Mime
View raw message