Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-733

RegexFileFilter uses the path and file name instead of just the file name.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.0
    • Fix Version/s: 2.10.0
    • Component/s: None
    • Labels:
      None

      Description

      I had a filename search where I looked for patterns that would not be picked up by surefire but had similar naming.

      It is with an "and", "no", and a "regex" filter similar to

      IOFileFilter fileFilter = FileFilterUtils.and(//
                  FileFilterUtils.notFileFilter(includeFileFilter), //
                  new RegexFileFilter(".*Test.*\\.java")); 

      I created a test project to reproduce the issue
      https://github.com/sellersj/apache-commons-io-issue

      I tested back to version 2.2 and it was the same to 2.8.0. The new behaviour happens with 2.9.0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ggregory Gary D. Gregory
                Reporter:
                sellersj Jim Sellers
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: