james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r1102195 - /james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxQuery.java
Date Thu, 12 May 2011 07:56:34 GMT
Author: norman
Date: Thu May 12 07:56:33 2011
New Revision: 1102195

URL: http://svn.apache.org/viewvc?rev=1102195&view=rev
Log:
Correctly handle * and % wildcards. See MAILBOX-65

Modified:
    james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxQuery.java

Modified: james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxQuery.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxQuery.java?rev=1102195&r1=1102194&r2=1102195&view=diff
==============================================================================
--- james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxQuery.java (original)
+++ james/mailbox/trunk/api/src/main/java/org/apache/james/mailbox/MailboxQuery.java Thu May
12 07:56:33 2011
@@ -71,7 +71,7 @@ public class MailboxQuery {
         this.pathDelimiter = pathDelimiter;
 
         // Compile some pattern which is used later
-        pattern = Pattern.compile(this.expression.replaceAll("\\" + pathDelimiter ,"\\\\"
+ pathDelimiter).replaceAll("\\*", "\\.\\*").replaceAll("\\%", "[^\\.]*"));
+        pattern = Pattern.compile(this.expression.replaceAll("\\" + pathDelimiter ,"\\\\"
+ pathDelimiter).replaceAll("\\*", "\\.\\*").replaceAll("\\%", "[^\\" + pathDelimiter  + "]*"));
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message