jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meteata...@apache.org
Subject svn commit: r1443497 - in /jackrabbit/oak/trunk/oak-mongomk/src: main/java/org/apache/jackrabbit/mongomk/impl/MongoMicroKernel.java test/java/org/apache/jackrabbit/mongomk/impl/MongoMKGetNodesTest.java
Date Thu, 07 Feb 2013 14:16:55 GMT
Author: meteatamel
Date: Thu Feb  7 14:16:54 2013
New Revision: 1443497

URL: http://svn.apache.org/viewvc?rev=1443497&view=rev
Log:
Fixed a minor bug encountered in getNodes call with -1 (limitless) depth

Modified:
    jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoMicroKernel.java
    jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKGetNodesTest.java

Modified: jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoMicroKernel.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoMicroKernel.java?rev=1443497&r1=1443496&r2=1443497&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoMicroKernel.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/main/java/org/apache/jackrabbit/mongomk/impl/MongoMicroKernel.java
Thu Feb  7 14:16:54 2013
@@ -190,6 +190,7 @@ public class MongoMicroKernel implements
             }
 
             JsopBuilder builder = new JsopBuilder().object();
+            depth = depth == -1? Integer.MAX_VALUE : depth;
             JsonUtil.toJson(builder, new MongoNodeState(rootNode), depth, (int)offset, maxChildNodes,
true, nodeFilter);
             return builder.endObject().toString();
         } catch (Exception e) {

Modified: jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKGetNodesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKGetNodesTest.java?rev=1443497&r1=1443496&r2=1443497&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKGetNodesTest.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk/src/test/java/org/apache/jackrabbit/mongomk/impl/MongoMKGetNodesTest.java
Thu Feb  7 14:16:54 2013
@@ -104,8 +104,7 @@ public class MongoMKGetNodesTest extends
         SimpleNodeScenario scenario = new SimpleNodeScenario(mk);
         scenario.create();
 
-        // FIXME - depth > 3449 does not work.
-        JSONObject root = parseJSONObject(mk.getNodes("/", null, 3449, 0, -1, null));
+        JSONObject root = parseJSONObject(mk.getNodes("/", null, -1, 0, -1, null));
         assertPropertyValue(root, ":childNodeCount", 1L);
 
         JSONObject a = resolveObjectValue(root, "a");



Mime
View raw message