Author: fmeschbe
Date: Fri Jan 18 05:50:49 2008
New Revision: 613161

URL: http://svn.apache.org/viewvc?rev=613161&view=rev
Log:
SLING-163 Ignore the search path if the resource type is an absolute path

Modified:
    
incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/ScriptPathSupport.java

Modified: 
incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/ScriptPathSupport.java
URL: 
http://svn.apache.org/viewvc/incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/ScriptPathSupport.java?rev=613161&r1=613160&r2=613161&view=diff
==============================================================================
--- 
incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/ScriptPathSupport.java
 (original)
+++ 
incubator/sling/trunk/scripting/resolver/src/main/java/org/apache/sling/scripting/resolver/ScriptPathSupport.java
 Fri Jan 18 05:50:49 2008
@@ -31,7 +31,7 @@
         String extension = request.getRequestPathInfo().getExtension();
 
         if (methodName == null || methodName.length() == 0) {
-            
+
             throw new IllegalArgumentException(
                 "HTTP Method name must not be empty");
 
@@ -54,6 +54,9 @@
     }
 
     private static class ScriptPathIterator implements Iterator<String> {
+
+        private static final String[] EMPTY_PATH = { "" };
+
         private final String resourceTypePath;
 
         private final String selectorsPath;
@@ -81,7 +84,7 @@
             }
 
             // path prefixes
-            this.path = path;
+            this.path = resourceTypePath.startsWith("/") ? EMPTY_PATH : path;;
             this.pathIdx = -1;
 
             // prepare the first entry


Reply via email to