Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 19612 invoked from network); 28 Sep 2010 15:17:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 15:17:01 -0000 Received: (qmail 68373 invoked by uid 500); 28 Sep 2010 15:17:00 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 67304 invoked by uid 500); 28 Sep 2010 15:16:57 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 66963 invoked by uid 99); 28 Sep 2010 15:16:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 15:16:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 15:16:55 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8SFGZLa028209 for ; Tue, 28 Sep 2010 15:16:35 GMT Message-ID: <20180624.444281285686995048.JavaMail.jira@thor> Date: Tue, 28 Sep 2010 11:16:35 -0400 (EDT) From: "Niall Pemberton (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (IO-246) FilenameUtils.wildcardMatch gives incorrect results In-Reply-To: <8680349.582541280135991996.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IO-246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Niall Pemberton updated IO-246: ------------------------------- Attachment: IO-246-wildcardMatch.patch While you're probably right that using "*?" in a wildcard expression should work as you expect - it would be difficult to fix wildcardMatch() to cater for this. Using "?*" effectively means the same thing - unfortunately this does not work either - but its much easier to fix. Also in my mind its more precise. For example an expression like "aa?*" always means "any character in the third position" for the "?" wildcard. > FilenameUtils.wildcardMatch gives incorrect results > --------------------------------------------------- > > Key: IO-246 > URL: https://issues.apache.org/jira/browse/IO-246 > Project: Commons IO > Issue Type: Bug > Components: Filters > Affects Versions: 1.4 > Environment: any > Reporter: vva > Priority: Minor > Attachments: IO-246-wildcardMatch.patch > > > This wildcard pattern "*?" does not match correctly. The command: > System.out.println(FilenameUtils.wildcardMatch("aaa", "*?")); > prints out "false", even though it matches. The wildcard mask is a bit unusal, but not incorrect. It should match any input with at least one character. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.