jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1145672 - in /jackrabbit/sandbox/spi2microkernel/src: main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Date Tue, 12 Jul 2011 16:50:35 GMT
Author: mduerig
Date: Tue Jul 12 16:50:35 2011
New Revision: 1145672

URL: http://svn.apache.org/viewvc?rev=1145672&view=rev
Log:
spi2microkernel (WIP)
- fix tests
- fix repository descriptors

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1145672&r1=1145671&r2=1145672&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Tue Jul 12 16:50:35 2011
@@ -83,10 +83,17 @@ public class RepositoryServiceImpl exten
         QValue[] FALSE = new QValue[]{Values.FALSE};
         QValue[] TRUE = new QValue[]{Values.TRUE};
 
-        put(NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, FALSE);
-        put(OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, TRUE);
-        put(OPTION_OBSERVATION_SUPPORTED, TRUE);
-        put(LEVEL_2_SUPPORTED, TRUE);
+        try {
+            put(NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, FALSE);
+            put(OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, TRUE);
+            put(OPTION_OBSERVATION_SUPPORTED, TRUE);
+            put(WRITE_SUPPORTED, TRUE);
+            put(IDENTIFIER_STABILITY, new QValue[] {Values.objectToValue(IDENTIFIER_STABILITY_METHOD_DURATION)});
+            put(LEVEL_2_SUPPORTED, TRUE);
+        }
+        catch (RepositoryException e) {
+            throw new IllegalStateException(e); // should not happen 
+        }
     }};
 
     private final MicroKernel microKernel;

Modified: jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java?rev=1145672&r1=1145671&r2=1145672&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/test/java/org/apache/jackrabbit/spi2microkernel/MicrokernelTest.java
Tue Jul 12 16:50:35 2011
@@ -22,6 +22,7 @@ package org.apache.jackrabbit.spi2microk
 import junit.framework.Assert;
 import org.apache.jackrabbit.mk.MicroKernelFactory;
 import org.apache.jackrabbit.mk.api.MicroKernel;
+import org.apache.jackrabbit.mk.api.MicroKernelException;
 import org.apache.jackrabbit.mk.json.JsopTokenizer;
 import org.json.simple.JSONArray;
 import org.json.simple.JSONObject;
@@ -70,7 +71,7 @@ public class MicrokernelTest {
         try {
             String s2 = mk.getNodes("/test/", head);
             Assert.fail("Success with invalid path: " + s2);
-        } catch (AssertionError e) {
+        } catch (MicroKernelException e) {
             // expected
         }
     }



Mime
View raw message