jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1213754 - /jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
Date Tue, 13 Dec 2011 15:56:57 GMT
Author: thomasm
Date: Tue Dec 13 15:56:56 2011
New Revision: 1213754

URL: http://svn.apache.org/viewvc?rev=1213754&view=rev
Log:
Simplify parsing nodes.

Modified:
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java?rev=1213754&r1=1213753&r2=1213754&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/large/DescendantCountTest.java
Tue Dec 13 15:56:56 2011
@@ -17,11 +17,9 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.fail;
 import org.apache.jackrabbit.mk.MultiMkTestBase;
 import org.apache.jackrabbit.mk.json.JsopBuilder;
-import org.apache.jackrabbit.mk.json.JsopTokenizer;
 import org.apache.jackrabbit.mk.json.fast.Jsop;
 import org.apache.jackrabbit.mk.json.fast.JsopObject;
 import org.apache.jackrabbit.mk.mem.NodeImpl;
-import org.apache.jackrabbit.mk.mem.NodeMap;
 import org.apache.jackrabbit.mk.util.NodeCreator;
 import org.junit.After;
 import org.junit.Test;
@@ -56,7 +54,6 @@ public class DescendantCountTest extends
         String head = mk.getHeadRevision();
         head = mk.commit("/:root/head/config", "^ \"descendantCount\": true", head, "");
 
-        NodeMap map = new NodeMap();
         NodeCreator c = new NodeCreator(mk);
         for (int i = 1; i < 20; i++) {
             c.setNodeName("test" + i);
@@ -66,9 +63,7 @@ public class DescendantCountTest extends
             c.create();
             head = mk.getHeadRevision();
             String json = JsopBuilder.prettyPrint(mk.getNodes("/test" + i, head, Integer.MAX_VALUE,
0, -1));
-            JsopTokenizer t = new JsopTokenizer(json);
-            t.read('{');
-            NodeImpl n = NodeImpl.parse(map, t, 0);
+            NodeImpl n = NodeImpl.parse(json);
             long count = count(n);
             JsopObject o = (JsopObject) Jsop.parse(json);
             Object d = o.get(NodeImpl.DESCENDANT_COUNT);



Mime
View raw message