Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 49694 invoked from network); 5 Mar 2010 00:18:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 Mar 2010 00:18:32 -0000 Received: (qmail 45142 invoked by uid 500); 5 Mar 2010 00:18:20 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 44988 invoked by uid 500); 5 Mar 2010 00:18:19 -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 44980 invoked by uid 99); 5 Mar 2010 00:18:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Mar 2010 00:18:19 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Mar 2010 00:18:18 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 31291234C4C8 for ; Fri, 5 Mar 2010 00:17:27 +0000 (UTC) Message-ID: <1341578155.85541267748247200.JavaMail.jira@brutus.apache.org> Date: Fri, 5 Mar 2010 00:17:27 +0000 (UTC) From: "Sebb (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (IO-240) FileFilterUtils can create cvsFilter and svnFilter more than once MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org FileFilterUtils can create cvsFilter and svnFilter more than once ----------------------------------------------------------------- Key: IO-240 URL: https://issues.apache.org/jira/browse/IO-240 Project: Commons IO Issue Type: Bug Reporter: Sebb Priority: Minor FileFilterUtils lazily creates the static fields cvsFilter and svnFilter; however access to the fields is not synchronized and the fields are not volatile. One thread can create the filter, but the updated value won't necessarily be seen by any/all other threads. This means that the fields can be created multiple times. Possible solutions: make the fields volatile, or use the singleton IODH idiom. The latter uses a bit more code, but is probably marginally cheaper if the field is used a lot. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.