jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meteata...@apache.org
Subject svn commit: r1436787 - /jackrabbit/oak/trunk/oak-mongomk-perf/src/main/java/org/apache/jackrabbit/mk/testing/MongoClearCollections.java
Date Tue, 22 Jan 2013 08:09:36 GMT
Author: meteatamel
Date: Tue Jan 22 08:09:36 2013
New Revision: 1436787

URL: http://svn.apache.org/viewvc?rev=1436787&view=rev
Log:
Fixed oak-mongomk-perf in light of the recent API change in oak-mongomk

Modified:
    jackrabbit/oak/trunk/oak-mongomk-perf/src/main/java/org/apache/jackrabbit/mk/testing/MongoClearCollections.java

Modified: jackrabbit/oak/trunk/oak-mongomk-perf/src/main/java/org/apache/jackrabbit/mk/testing/MongoClearCollections.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mongomk-perf/src/main/java/org/apache/jackrabbit/mk/testing/MongoClearCollections.java?rev=1436787&r1=1436786&r2=1436787&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mongomk-perf/src/main/java/org/apache/jackrabbit/mk/testing/MongoClearCollections.java
(original)
+++ jackrabbit/oak/trunk/oak-mongomk-perf/src/main/java/org/apache/jackrabbit/mk/testing/MongoClearCollections.java
Tue Jan 22 08:09:36 2013
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.mk.testing;
 
 import java.util.Arrays;
+import java.util.Collections;
 
 import org.apache.jackrabbit.mongomk.impl.MongoConnection;
 import org.apache.jackrabbit.mongomk.impl.model.MongoCommit;
@@ -40,7 +41,7 @@ public class MongoClearCollections {
 
     /**
      * Removes all documents from nodes collection.
-     * 
+     *
      * @param mongoConnection
      */
     public static void clearNodesCollection(MongoConnection mongoConnection) {
@@ -59,7 +60,7 @@ public class MongoClearCollections {
 
     /**
      * Removes all documents from commits collection.
-     * 
+     *
      * @param mongoConnection
      */
     public static void clearCommitsCollection(MongoConnection mongoConnection) {
@@ -71,7 +72,7 @@ public class MongoClearCollections {
         commitCollection.remove(new BasicDBObject());
 
         MongoCommit commit = new MongoCommit();
-        commit.setAffectedPaths(Arrays.asList(new String[] { "/" }));
+        commit.setAffectedPaths(Collections.singleton("/"));
         commit.setBaseRevisionId(0L);
         commit.setDiff(INITIAL_COMMIT_DIFF);
         commit.setMessage(INITIAL_COMMIT_MESSAGE);
@@ -82,7 +83,7 @@ public class MongoClearCollections {
 
     /**
      * Removes all documents from head collection.
-     * 
+     *
      * @param mongoConnection
      */
     public static void clearHeadCollection(MongoConnection mongoConnection) {
@@ -100,7 +101,7 @@ public class MongoClearCollections {
 
     /**
      * Removes all documents from all microkernel collections.
-     * 
+     *
      * @param mongoConnection
      */
     public static void clearAllCollections(MongoConnection mongoConnection) {



Mime
View raw message