incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r727753 - /incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
Date Thu, 18 Dec 2008 15:48:54 GMT
Author: fmeschbe
Date: Thu Dec 18 07:48:54 2008
New Revision: 727753

URL: http://svn.apache.org/viewvc?rev=727753&view=rev
Log:
SLING-787 Ensure MapEntry patterns are matched only at the beginning of the string

Modified:
    incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java

Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java?rev=727753&r1=727752&r2=727753&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
(original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/MapEntry.java
Thu Dec 18 07:48:54 2008
@@ -183,6 +183,11 @@
             }
         }
 
+        // ensure pattern is hooked to the start of the string
+        if (!url.startsWith("^")) {
+            url = "^".concat(url);
+        }
+        
         this.urlPattern = Pattern.compile(url);
         this.redirect = redirect;
         this.status = status;



Mime
View raw message