Return-Path: X-Original-To: apmail-cocoon-cvs-archive@www.apache.org Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C4F9A6083 for ; Fri, 24 Jun 2011 10:12:17 +0000 (UTC) Received: (qmail 91959 invoked by uid 500); 24 Jun 2011 10:12:17 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 91895 invoked by uid 500); 24 Jun 2011 10:12:17 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 91888 invoked by uid 99); 24 Jun 2011 10:12:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 10:12:16 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jun 2011 10:12:14 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 474BC23888BD for ; Fri, 24 Jun 2011 10:11:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1139230 - /cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/util/WildcardMatcherHelper.java Date: Fri, 24 Jun 2011 10:11:53 -0000 To: cvs@cocoon.apache.org From: reinhard@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110624101153.474BC23888BD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: reinhard Date: Fri Jun 24 10:11:52 2011 New Revision: 1139230 URL: http://svn.apache.org/viewvc?rev=1139230&view=rev Log: fix spelling mistakes in comments Modified: cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/util/WildcardMatcherHelper.java Modified: cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/util/WildcardMatcherHelper.java URL: http://svn.apache.org/viewvc/cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/util/WildcardMatcherHelper.java?rev=1139230&r1=1139229&r2=1139230&view=diff ============================================================================== --- cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/util/WildcardMatcherHelper.java (original) +++ cocoon/cocoon3/trunk/cocoon-sitemap/src/main/java/org/apache/cocoon/sitemap/util/WildcardMatcherHelper.java Fri Jun 24 10:11:52 2011 @@ -40,15 +40,15 @@ public class WildcardMatcherHelper { // ~ Methods ------------------------------------------------------------------------------------ /** - * Match a pattern agains a string and isolates wildcard replacement into a Map.
+ * Match a pattern against a string and isolates wildcard replacement into a Map.
* Here is how the matching algorithm works: - * + * *
    - *
  • The '*' character, meaning that zero or more characters (excluding the path separator '/') are to be - * matched.
  • - *
  • The '**' sequence, meaning that zero or more characters (including the path separator '/') are to be - * matched.
  • - *
  • The '\*' sequence is honored as a litteral '*' character, not a wildcard
  • + *
  • The '*' character, meaning that zero or more characters (excluding the path separator '/') are to be matched. + *
  • + *
  • The '**' sequence, meaning that zero or more characters (including the path separator '/') are to be matched. + *
  • + *
  • The '\*' sequence is honored as a literal '*' character, not a wildcard
  • *
*
* When more than two '*' characters, not separated by another character, are found their value is considered as @@ -56,15 +56,15 @@ public class WildcardMatcherHelper { * The '**' wildcard is greedy and thus the following sample matches as {"foo/bar","baz","bug"}: *
*
pattern
- *
STAR,STAR,PATHSEP,STAR,PATHSEP,STAR,STAR (why can't I express it litterally?) + *
STAR,STAR,PATHSEP,STAR,PATHSEP,STAR,STAR (why can't I express it literally?) *
string
*
foo/bar/baz/bug *
* The first '**' in the pattern will suck up as much as possible without making the match fail. - * + * * @param pat The pattern string. * @param str The string to math agains the pattern - * + * * @return a Map containing the representation of the extracted pattern. The extracted patterns are * keys in the Map from left to right beginning with "1" for te left most, "2" for the next, * a.s.o. The key "0" is the string itself. If the return value is null, string does not match to the