Author: rhauch
Date: 2009-03-03 14:20:59 -0500 (Tue, 03 Mar 2009)
New Revision: 747
Modified:
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrRepository.java
trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JackrabbitJcrTckTest.java
trunk/dna-jcr/src/test/resources/repositoryStubImpl.properties
Log:
DNA-288 JcrRepository.login Does Not Match JCR 1.0 Specification
Applied the patch that corrects the behavior when the workspace name submitted to the
login method does not match the name of an existing workspace. The patch also adds to the
JCR TCK tests.
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrRepository.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrRepository.java 2009-03-03 01:33:10
UTC (rev 746)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrRepository.java 2009-03-03 19:20:59
UTC (rev 747)
@@ -295,8 +295,8 @@
// Verify that the workspace exists (or can be created) ...
Set<String> workspaces = graph.getWorkspaces();
if (!workspaces.contains(workspaceName)) {
- // Try to create it ...
- graph.createWorkspace().namedSomethingLike(workspaceName).getName();
+ // Per JCR 1.0 6.1.1, if the workspaceName is not recognized, a
NoSuchWorkspaceException is thrown
+ throw new
NoSuchWorkspaceException(JcrI18n.workspaceNameIsInvalid.text(sourceName, workspaceName));
}
workspaceName = graph.getCurrentWorkspace().getName();
} catch (InvalidWorkspaceException e) {
Modified: trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
===================================================================
--- trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties 2009-03-03
01:33:10 UTC (rev 746)
+++ trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties 2009-03-03
19:20:59 UTC (rev 747)
@@ -25,7 +25,7 @@
credentialsMustProvideJaasMethod = The Credentials class "{0}" must implement
either "public LoginContext getLoginContext();" or "public
AccessControlContext getAccessControlContext();".
credentialsMustReturnAccessControlContext = The "getAccessControlContext()"
method in Credentials class "{0}" must not return a null.
credentialsMustReturnLoginContext = The "getLoginContext()" method in
Credentials class "{0}" must not return a null.
-defaultWorkspaceName = Default
+defaultWorkspaceName=
inputStreamConsumed = This value was already consumed as an input stream.
nonInputStreamConsumed = This value was already consumed as a non-input stream.
pathNotFound = No item exists at path {0}
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JackrabbitJcrTckTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JackrabbitJcrTckTest.java 2009-03-03
01:33:10 UTC (rev 746)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JackrabbitJcrTckTest.java 2009-03-03
19:20:59 UTC (rev 747)
@@ -75,7 +75,7 @@
addTestSuite(org.apache.jackrabbit.test.api.RootNodeTest.class);
// addTestSuite(org.apache.jackrabbit.test.api.NodeReadMethodsTest.class);
// addTestSuite(org.apache.jackrabbit.test.api.PropertyTypeTest.class);
- //
addTestSuite(org.apache.jackrabbit.test.api.NodeDiscoveringNodeTypesTest.class);
+
addTestSuite(org.apache.jackrabbit.test.api.NodeDiscoveringNodeTypesTest.class);
addTestSuite(org.apache.jackrabbit.test.api.BinaryPropertyTest.class);
addTestSuite(org.apache.jackrabbit.test.api.BooleanPropertyTest.class);
addTestSuite(org.apache.jackrabbit.test.api.DatePropertyTest.class);
@@ -96,7 +96,7 @@
addTestSuite(org.apache.jackrabbit.test.api.ReferenceableRootNodesTest.class);
// addTestSuite(org.apache.jackrabbit.test.api.ExportSysViewTest.class);
// addTestSuite(org.apache.jackrabbit.test.api.ExportDocViewTest.class);
- // addTestSuite(org.apache.jackrabbit.test.api.RepositoryLoginTest.class);
+ addTestSuite(org.apache.jackrabbit.test.api.RepositoryLoginTest.class);
// These might not all be level one tests
//
addTestSuite(org.apache.jackrabbit.test.api.query.XPathPosIndexTest.class);
Modified: trunk/dna-jcr/src/test/resources/repositoryStubImpl.properties
===================================================================
--- trunk/dna-jcr/src/test/resources/repositoryStubImpl.properties 2009-03-03 01:33:10 UTC
(rev 746)
+++ trunk/dna-jcr/src/test/resources/repositoryStubImpl.properties 2009-03-03 19:20:59 UTC
(rev 747)
@@ -6,4 +6,4 @@
javax.jcr.tck.nodename4=node4
javax.jcr.tck.propertyname1=prop1
javax.jcr.tck.propertyname2=prop2
-javax.jcr.tck.workspacename=test
+javax.jcr.tck.workspacename=
Show replies by date