jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1465988 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/TreeImpl.java
Date Tue, 09 Apr 2013 12:16:44 GMT
Author: mduerig
Date: Tue Apr  9 12:16:44 2013
New Revision: 1465988

URL: http://svn.apache.org/r1465988
Log:
OAK-741: Better toString() methods
Avoid InvalidStateException on disconnected trees

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=1465988&r1=1465987&r2=1465988&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
Tue Apr  9 12:16:44 2013
@@ -403,7 +403,11 @@ public class TreeImpl implements Tree {
 
     @Override
     public String toString() {
-        return getPathInternal() + ": " + getNodeState();
+        if (nodeBuilder.isConnected()) {
+            return getPathInternal() + ": " + getNodeState();
+        } else {
+            return "disconnected";
+        }
     }
 
     //-----------------------------------------------------------< internal >---



Mime
View raw message