incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1035639 - /sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
Date Tue, 16 Nov 2010 14:05:44 GMT
Author: justin
Date: Tue Nov 16 14:05:44 2010
New Revision: 1035639

URL: http://svn.apache.org/viewvc?rev=1035639&view=rev
Log:
SLING-1875 - using Workspace.createWorkspace() instead of JackrabbitWorkspace.createWorkspace()

Modified:
    sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java

Modified: sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java?rev=1035639&r1=1035638&r2=1035639&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
(original)
+++ sling/trunk/bundles/jcr/base/src/main/java/org/apache/sling/jcr/base/AbstractSlingRepository.java
Tue Nov 16 14:05:44 2010
@@ -30,7 +30,6 @@ import javax.jcr.SimpleCredentials;
 import javax.jcr.Value;
 import javax.jcr.Workspace;
 
-import org.apache.jackrabbit.api.JackrabbitWorkspace;
 import org.apache.sling.jcr.api.NamespaceMapper;
 import org.apache.sling.jcr.api.SlingRepository;
 import org.apache.sling.jcr.base.internal.loader.Loader;
@@ -688,15 +687,8 @@ public abstract class AbstractSlingRepos
             Credentials sc = getAdministrativeCredentials(this.adminUser);
             tmpSession = this.getRepository().login(sc);
             Workspace defaultWs = tmpSession.getWorkspace();
-            if (defaultWs instanceof JackrabbitWorkspace) {
-                ((JackrabbitWorkspace) defaultWs).createWorkspace(workspace);
-                return true;
-            }
-
-            // not Jackrabbit
-            this.log(LogService.LOG_ERROR,
-                "createWorkspace: Cannot create requested workspace "
-                    + workspace + ": Jackrabbit is required");
+            defaultWs.createWorkspace(workspace);
+            return true;
         } catch (Throwable t) {
             this.log(LogService.LOG_ERROR,
                 "createWorkspace: Cannot create requested workspace "



Mime
View raw message