jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1330824 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/AbstractNameMapper.java oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/PathsTest.java oak-it/jcr/pom.xml
Date Thu, 26 Apr 2012 12:57:03 GMT
Author: reschke
Date: Thu Apr 26 12:57:03 2012
New Revision: 1330824

URL: http://svn.apache.org/viewvc?rev=1330824&view=rev
Log:
OAK-61: fix jcr-oak mapping of "{}foo"; adjust test results

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/AbstractNameMapper.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/PathsTest.java
    jackrabbit/oak/trunk/oak-it/jcr/pom.xml

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/AbstractNameMapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/AbstractNameMapper.java?rev=1330824&r1=1330823&r2=1330824&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/AbstractNameMapper.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/AbstractNameMapper.java
Thu Apr 26 12:57:03 2012
@@ -28,10 +28,10 @@ public abstract class AbstractNameMapper
     public String getOakName(String jcrName) {
 
         int pos = jcrName.indexOf(':');
-
+        
         if (pos < 0) {
             // no colon
-            return jcrName;
+            return jcrName.startsWith("{}") ? jcrName.substring(2) : jcrName;
         } else {
             if (jcrName.charAt(0) == '{') {
                 int endpos = jcrName.indexOf('}');

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/PathsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/PathsTest.java?rev=1330824&r1=1330823&r2=1330824&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/PathsTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/PathsTest.java
Thu Apr 26 12:57:03 2012
@@ -56,6 +56,7 @@ public class PathsTest {
     @Test
     public void testJcrToOak() {
         assertEquals("/", Paths.toOakPath("/", mapper));
+        assertEquals("foo", Paths.toOakPath("{}foo", mapper));
         assertEquals("/oak-foo:bar", Paths.toOakPath("/foo:bar", mapper));
         assertEquals("/oak-foo:bar/oak-quu:qux",
                 Paths.toOakPath("/foo:bar/quu:qux", mapper));

Modified: jackrabbit/oak/trunk/oak-it/jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/jcr/pom.xml?rev=1330824&r1=1330823&r2=1330824&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-it/jcr/pom.xml Thu Apr 26 12:57:03 2012
@@ -51,7 +51,7 @@ org.apache.jackrabbit.test.api.Namespace
 org.apache.jackrabbit.test.api.SessionReadMethodsTest#testGetNodeByUUIDFailure
 org.apache.jackrabbit.test.api.ExportSysViewTest
 org.apache.jackrabbit.test.api.ExportDocViewTest
-org.apache.jackrabbit.test.api.NameTest
+org.apache.jackrabbit.test.api.NameTest#testExpandedNodeTypeName
 org.apache.jackrabbit.test.api.PathTest
 org.apache.jackrabbit.test.api.AddNodeTest
 org.apache.jackrabbit.test.api.NamespaceRegistryTest



Mime
View raw message