You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gi...@apache.org on 2006/06/23 16:29:41 UTC

svn commit: r416731 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/WildcardMatcherHelper.java

Author: giacomo
Date: Fri Jun 23 07:29:40 2006
New Revision: 416731

URL: http://svn.apache.org/viewvc?rev=416731&view=rev
Log:
more fixes

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/WildcardMatcherHelper.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/WildcardMatcherHelper.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/WildcardMatcherHelper.java?rev=416731&r1=416730&r2=416731&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/WildcardMatcherHelper.java (original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/util/WildcardMatcherHelper.java Fri Jun 23 07:29:40 2006
@@ -267,12 +267,14 @@
                     return checkEnds(sipat);
                 }
 
-                // Now we need to check whether the litteral substring of the pattern 
-                // is contained in the string somewhere
-                if(apat[ipat] != PATHSEP) {
+                // If we stopped at an other wildcard
+                // we exclude it from being compared
+                if(apat[ipat] == STAR) {
                     ipat--;
                 }
 
+                // Now we need to check whether the litteral substring of the pattern 
+                // is contained in the string somewhere
                 final int l = ipat- sipat + 1;
                 final int sistr = istr;
 
@@ -281,7 +283,7 @@
                 if(istr >= lstr) return false;
 
                 add(new String(astr, sistr, istr - sistr));
-                ipat += l;
+                ipat++;
                 istr += l;
             }