You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2008/10/08 14:20:44 UTC
svn commit: r702823 -
/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Author: cziegeler
Date: Wed Oct 8 05:20:44 2008
New Revision: 702823
URL: http://svn.apache.org/viewvc?rev=702823&view=rev
Log:
SLING-687 - Fix regexp and apply submitted patch.
Modified:
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java?rev=702823&r1=702822&r2=702823&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolverFactoryImpl.java Wed Oct 8 05:20:44 2008
@@ -115,14 +115,14 @@
/**
* These regexps are executing during the resource resolving phase
* before the mappings are applied.
- * @scr.property values.1="/_(.+?)_|/$1:"
+ * @scr.property values.1="/_([^/]+?)_|/$1:"
*/
private static final String PROP_REGEXPS = "resource.resolver.regexps";
/**
* These regexps are executed during a map operation as the back conversion
- * of the {@link #PROP_REGEXPS}.
- * @scr.property values.1="/_(.+?)_|/$1:"
+ * of the {@link #PROP_REGEXPS}
+ * @scr.property values.1="/([^/]+?):([^/]+)|/_$1_$2"
*/
private static final String PROP_MAPREGEXPS = "resource.resolver.mapregexps";
@@ -386,7 +386,7 @@
if (root.endsWith("/") && root.length() > 1) {
root = root.substring(0, root.length() - 1);
}
-
+
try {
rootProviderEntry.addResourceProvider(root, provider);
} catch (IllegalStateException ise) {
@@ -407,7 +407,7 @@
if (root.endsWith("/") && root.length() > 1) {
root = root.substring(0, root.length() - 1);
}
-
+
// TODO: Do not remove this path, if another resource
// owns it. This may be the case if adding the provider
// yielded an IllegalStateException