jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1162115 - in /jackrabbit/sandbox/microkernel/src: main/java/org/apache/jackrabbit/mk/index/ test/java/org/apache/jackrabbit/mk/index/
Date Fri, 26 Aug 2011 13:36:39 GMT
Author: thomasm
Date: Fri Aug 26 13:36:38 2011
New Revision: 1162115

URL: http://svn.apache.org/viewvc?rev=1162115&view=rev
Log:
Formatting

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/IndexNode.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IdentifierIndexTest.java
    jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java?rev=1162115&r1=1162114&r2=1162115&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/Index.java
Fri Aug 26 13:36:38 2011
@@ -27,7 +27,7 @@ import org.apache.jackrabbit.mk.util.Pat
  */
 public class Index {
 
-    private final static int DEFAULT_MIN_SIZE = 2;
+    private static final int DEFAULT_MIN_SIZE = 2;
 
     private Indexer indexer;
 

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/IndexNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/IndexNode.java?rev=1162115&r1=1162114&r2=1162115&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/IndexNode.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/index/IndexNode.java
Fri Aug 26 13:36:38 2011
@@ -34,7 +34,7 @@ class IndexNode extends IndexPage {
 
     String getNextChildPath() {
         int max = 0;
-        for(String c : children) {
+        for (String c : children) {
             int x = Integer.parseInt(c);
             if (x > max) {
                 max = x;

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IdentifierIndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IdentifierIndexTest.java?rev=1162115&r1=1162114&r2=1162115&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IdentifierIndexTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IdentifierIndexTest.java
Fri Aug 26 13:36:38 2011
@@ -25,8 +25,8 @@ import org.apache.jackrabbit.mk.api.Micr
  */
 public class IdentifierIndexTest extends TestCase {
 
-    private static final String URL = "fs:{homeDir}/target;clean";
-    // private static final String URL = "mem:fs:target/temp;clean";
+    private static final String URL = "fs:{homeDir}/target";
+    // private static final String URL = "mem:fs:target/temp";
     // private static final String URL = "mem:";
 
     public void test() {
@@ -34,7 +34,7 @@ public class IdentifierIndexTest extends
     }
 
     private void test(String url) {
-        MicroKernel mk = MicroKernelFactory.getInstance(url);
+        MicroKernel mk = MicroKernelFactory.getInstance(url + ";clean");
         Indexer indexer = new Indexer(mk);
         Index index = indexer.createUniqueIndex("id");
 
@@ -54,6 +54,13 @@ public class IdentifierIndexTest extends
         assertEquals("/test/test", index.getPath("\"3\"", head));
 
         mk.dispose();
+
+        mk = MicroKernelFactory.getInstance(url);
+        indexer = new Indexer(mk);
+        index = indexer.createUniqueIndex("id");
+        head = mk.getHeadRevision();
+        assertEquals("/test/test", index.getPath("\"3\"", head));
+        mk.dispose();
     }
 
 }

Modified: jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java?rev=1162115&r1=1162114&r2=1162115&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java
(original)
+++ jackrabbit/sandbox/microkernel/src/test/java/org/apache/jackrabbit/mk/index/IndexTest.java
Fri Aug 26 13:36:38 2011
@@ -142,7 +142,6 @@ public class IndexTest extends TestCase 
         Random r = new Random(1);
         TreeMap<Integer, String> tree = new TreeMap<Integer, String>();
         for (int i = 0; i < 100; i++) {
-            if (i==31)
             log("op #" + i);
             print(mk, index);
             int x = r.nextInt(10);



Mime
View raw message