incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1514646 - in /sling/trunk/launchpad/base/src: main/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProvider.java test/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProviderTest.java
Date Fri, 16 Aug 2013 10:33:26 GMT
Author: bdelacretaz
Date: Fri Aug 16 10:33:26 2013
New Revision: 1514646

URL: http://svn.apache.org/r1514646
Log:
SLING-3022 - correctly accept resources with names like resources/bundles.someRunMode/12/

Modified:
    sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProvider.java
    sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProviderTest.java

Modified: sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProvider.java?rev=1514646&r1=1514645&r2=1514646&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProvider.java
(original)
+++ sling/trunk/launchpad/base/src/main/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProvider.java
Fri Aug 16 10:33:26 2013
@@ -46,7 +46,7 @@ public class ClassLoaderResourceProvider
     }
     
     static Pattern getResourcePathPattern(String forPath) {
-        return Pattern.compile("^" + forPath + "/[^/]+/?$");
+        return Pattern.compile("^" + forPath + "(\\.[^/]+)?/[^/]+/?$");
     }
 
     public Iterator<String> getChildren(String path) {

Modified: sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProviderTest.java
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProviderTest.java?rev=1514646&r1=1514645&r2=1514646&view=diff
==============================================================================
--- sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProviderTest.java
(original)
+++ sling/trunk/launchpad/base/src/test/java/org/apache/sling/launchpad/base/impl/ClassLoaderResourceProviderTest.java
Fri Aug 16 10:33:26 2013
@@ -50,15 +50,13 @@ public class ClassLoaderResourceProvider
         assertMatch("something/else/0/", false);
         assertMatch("something/else/0", false);
         
-        /* these fail due to SLING-3022
-        assertMatch("resources/bundles.someRunMode/", true);
+        assertMatch("resources/bundles.someRunMode/", false);
         assertMatch("resources/bundles.someRunMode/14/", true);
-        assertMatch("resources/bundles.someRunMode/15", false);
+        assertMatch("resources/bundles.someRunMode/15", true);
         
         assertMatch("resources/bundles.runModeA.runModeB/", false);
         assertMatch("resources/bundles.runModeA.runModeB/14/", true);
         assertMatch("resources/bundles.runModeA.runModeB/14", true);
         assertMatch("resources/bundles.runModeA.runModeB/15/16", false);
-        */
     }
 }



Mime
View raw message