jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1148682 - /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Date Wed, 20 Jul 2011 10:13:27 GMT
Author: mduerig
Date: Wed Jul 20 10:13:26 2011
New Revision: 1148682

URL: http://svn.apache.org/viewvc?rev=1148682&view=rev
Log:
spi2microkernel (WIP)
- throw more specific exception

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.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=1148682&r1=1148681&r2=1148682&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
Wed Jul 20 10:13:26 2011
@@ -59,6 +59,7 @@ import org.slf4j.LoggerFactory;
 
 import javax.jcr.Credentials;
 import javax.jcr.GuestCredentials;
+import javax.jcr.ItemNotFoundException;
 import javax.jcr.NoSuchWorkspaceException;
 import javax.jcr.PathNotFoundException;
 import javax.jcr.RepositoryException;
@@ -113,7 +114,7 @@ public class RepositoryServiceImpl exten
         super(DESCRIPTORS, Collections.<String, String>emptyMap(), NodeTypes.getDefaultNodeTypes());
 
         try {
-            this.microKernel = microKernel;  // xxx who disposes the micro kernel?
+            this.microKernel = microKernel;  // fixme who disposes the micro kernel?
 
             String head = microKernel.getHeadRevision();
             createWorkspace(head, Paths.DEFAULT_WORKSPACE, true);
@@ -402,10 +403,10 @@ public class RepositoryServiceImpl exten
 
     //------------------------------------------< private >---
 
-    private static Path getPath(NodeId nodeId) {
+    private static Path getPath(NodeId nodeId) throws ItemNotFoundException {
         Path path = nodeId.getPath();
         if (path == null) {
-            throw new IllegalArgumentException("Non path based id: " + nodeId);
+            throw new ItemNotFoundException(nodeId.toString());
         }
         
         return path;



Mime
View raw message