Commons IO
  1. Commons IO
  2. IO-240

FileFilterUtils can create cvsFilter and svnFilter more than once

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Activity

        Henri Yandell made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Workflow jira [ 12500900 ] Default workflow, editable Closed status [ 12601908 ]
        Niall Pemberton made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Niall Pemberton [ niallp ]
        Fix Version/s 2.0 [ 12312961 ]
        Resolution Fixed [ 1 ]
        Show
        Niall Pemberton added a comment - Fixed: http://svn.apache.org/viewvc?view=revision&revision=982437
        Sebb created issue -

          People

          • Assignee:
            Niall Pemberton
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development