jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1334425 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Date Sat, 05 May 2012 14:47:25 GMT
Author: mduerig
Date: Sat May  5 14:47:25 2012
New Revision: 1334425

URL: http://svn.apache.org/viewvc?rev=1334425&view=rev
Log:
OAK-18: Define Oak API
addChild should call listener on success only

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java?rev=1334425&r1=1334424&r2=1334425&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Sat May  5 14:47:25 2012
@@ -323,12 +323,10 @@ public class TreeImpl implements Tree {
 
     @Override
     public Tree addChild(String name) {
-        builder.addNode(name);
-        TreeImpl added = getChild(name);
-        if (added != null) {
+        if (builder.addNode(name) != null) {
             listener.addChild(this, name);
         }
-        return added;
+        return getChild(name);
     }
 
     @Override



Mime
View raw message