jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1328838 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/namepath/ test/java/org/apache/jackrabbit/oak/namepath/
Date Sun, 22 Apr 2012 10:34:49 GMT
Author: mduerig
Date: Sun Apr 22 10:34:48 2012
New Revision: 1328838

URL: http://svn.apache.org/viewvc?rev=1328838&view=rev
Log:
OAK-61: Implement JCR path handling
- rename NameSpaceRegistryTest to NamespaceMappingsTest to match class under test
- improve auth generated name 


Added:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamespaceMappingsTest.java
      - copied, changed from r1328837, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NameSpaceRegistryTest.java
Removed:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NameSpaceRegistryTest.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamespaceMappings.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamespaceMappings.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamespaceMappings.java?rev=1328838&r1=1328837&r2=1328838&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamespaceMappings.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/NamespaceMappings.java
Sun Apr 22 10:34:48 2012
@@ -56,8 +56,8 @@ public class NamespaceMappings {
         if (mk == null) {
             // Generate a mk prefix. Use jcrPrefix if possible, disambiguate otherwise
             mk = jcrPrefix;
-            while (ns2MkMap.containsValue(mk)) {
-                mk += "+"; // todo: use more sophisticated approach for generating unique
names
+            for (int i = 2; ns2MkMap.containsValue(mk); i++) {
+                mk = jcrPrefix + i;
             }
             ns2MkMap.put(namespace, mk);
         }

Copied: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamespaceMappingsTest.java
(from r1328837, jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NameSpaceRegistryTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamespaceMappingsTest.java?p2=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamespaceMappingsTest.java&p1=jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NameSpaceRegistryTest.java&r1=1328837&r2=1328838&rev=1328838&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NameSpaceRegistryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/namepath/NamespaceMappingsTest.java
Sun Apr 22 10:34:48 2012
@@ -22,7 +22,7 @@ import static org.junit.Assert.assertEqu
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
 
-public class NameSpaceRegistryTest {
+public class NamespaceMappingsTest {
 
     @Test
     public void nameSpaceRegistry() {



Mime
View raw message