[ 
https://issues.apache.org/jira/browse/IO-240?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niall Pemberton resolved IO-240.
--------------------------------

         Assignee: Niall Pemberton
    Fix Version/s: 2.0
       Resolution: Fixed

Fixed: http://svn.apache.org/viewvc?view=revision&revision=982437

> 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
>            Assignee: Niall Pemberton
>            Priority: Minor
>             Fix For: 2.0
>
>
> 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.

Reply via email to