incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r652610 - in /incubator/sling/trunk/jcr/base: pom.xml src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java
Date Thu, 01 May 2008 18:20:55 GMT
Author: fmeschbe
Date: Thu May  1 11:20:55 2008
New Revision: 652610

URL: http://svn.apache.org/viewvc?rev=652610&view=rev
Log:
SLING-411 Drop exception class and replace former use by a
plain old NullPointerException.
(+ remove optional resolution import declaration for
org.apache.xml, which is not needed anymore)

Modified:
    incubator/sling/trunk/jcr/base/pom.xml
    incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java

Modified: incubator/sling/trunk/jcr/base/pom.xml
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/base/pom.xml?rev=652610&r1=652609&r2=652610&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/base/pom.xml (original)
+++ incubator/sling/trunk/jcr/base/pom.xml Thu May  1 11:20:55 2008
@@ -71,9 +71,6 @@
                             org.apache.sling.jcr.base.internal.*,
                             org.apache.jackrabbit.rmi.*
                         </Private-Package>
-                        <Import-Package>
-                            org.apache.xml.*; resolution:=optional, *
-                        </Import-Package>
                     </instructions>
                 </configuration>
             </plugin>
@@ -83,11 +80,6 @@
     <dependencies>
         <dependency>
             <groupId>org.apache.sling</groupId>
-            <artifactId>org.apache.sling.api</artifactId>
-            <version>2.0.0-incubator-SNAPSHOT</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.jcr.api</artifactId>
             <version>2.0.0-incubator-SNAPSHOT</version>
         </dependency>

Modified: incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java?rev=652610&r1=652609&r2=652610&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java
(original)
+++ incubator/sling/trunk/jcr/base/src/main/java/org/apache/sling/jcr/base/util/RepositoryAccessor.java
Thu May  1 11:20:55 2008
@@ -27,7 +27,6 @@
 import org.apache.jackrabbit.rmi.client.LocalAdapterFactory;
 import org.apache.jackrabbit.rmi.jackrabbit.JackrabbitClientAdapterFactory;
 import org.apache.jackrabbit.rmi.remote.RemoteRepository;
-import org.apache.sling.api.SlingException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -48,12 +47,6 @@
      */
     public static final String REPOSITORY_URL_OVERRIDE_PROPERTY = "sling.repository.url";
 
-    public static class RepositoryUrlException extends SlingException {
-        RepositoryUrlException(String reason) {
-            super(reason);
-        }
-    }
-
     /**
      * First try to access the Repository via JNDI (unless jndiContext is null),
      * and if not successful try RMI.
@@ -147,11 +140,13 @@
      * <pre>
      *      jndi://jackrabbit:java.naming.factory.initial=org.SomeClass,java.naming.provider.url=http://foo.com
      * </pre>
+     * 
+     * @throws NullPointerException If <code>url</code> is <code>null</code>.
      */
-    public Repository getRepositoryFromURL(String url)
-            throws RepositoryUrlException {
+    public Repository getRepositoryFromURL(String url) {
+        
         if (url == null) {
-            throw new RepositoryUrlException("null URL");
+            throw new NullPointerException("url");
         }
 
         if (url.startsWith(JNDI_PREFIX)) {



Mime
View raw message