jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1468910 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
Date Wed, 17 Apr 2013 13:39:03 GMT
Author: mduerig
Date: Wed Apr 17 13:39:03 2013
New Revision: 1468910

URL: http://svn.apache.org/r1468910
Log:
OAK-741: Better toString() methods
avoid UnsupportedOperationException in MutableNodeState.toString()

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java?rev=1468910&r1=1468909&r2=1468910&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeBuilder.java
Wed Apr 17 13:39:03 2013
@@ -573,6 +573,25 @@ public class MemoryNodeBuilder implement
             }
         }
 
+        @Override
+        public String toString() {
+            StringBuilder builder = new StringBuilder();
+            builder.append(base).append(" + {");
+            String separator = " ";
+            for (PropertyState property : properties.values()) {
+                builder.append(separator);
+                separator = ", ";
+                builder.append(property);
+            }
+            for (Entry<String, MutableNodeState> entry : nodes.entrySet()) {
+                builder.append(separator);
+                separator = ", ";
+                builder.append(entry);
+            }
+            builder.append(" }");
+            return builder.toString();
+        }
+
         //-----------------------------------------------------< NodeState >--
 
         @Override



Mime
View raw message