Lucene - Core
  1. Lucene - Core
  2. LUCENE-6424

DirectoryStream<Path> doesnt wrap with FilterPath

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.2, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This can cause various mayhem e.g. globs with Files.newDirectoryStream may not work correctly.

      1. LUCENE-6424.patch
        26 kB
        Robert Muir
      2. LUCENE-6424.patch
        15 kB
        Ryan Ernst
      3. LUCENE-6424.patch
        30 kB
        Ryan Ernst

        Activity

        Hide
        Ryan Ernst added a comment -

        Here is a patch which fixes FilterDirectoryStream to take the filesystem it should filter against and a couple tests for newDirectoryStream with and without a glob.

        Show
        Ryan Ernst added a comment - Here is a patch which fixes FilterDirectoryStream to take the filesystem it should filter against and a couple tests for newDirectoryStream with and without a glob.
        Hide
        Ryan Ernst added a comment -

        New patch which fixes the glob test to actually check something, and a wraps the filter passed to newDirectoryStream so globs actually work.

        Show
        Ryan Ernst added a comment - New patch which fixes the glob test to actually check something, and a wraps the filter passed to newDirectoryStream so globs actually work.
        Hide
        Robert Muir added a comment -

        +1

        When committing can you make the 'fileSystem' instance variable of Filter(Secure)DirectoryStream final?

        Show
        Robert Muir added a comment - +1 When committing can you make the 'fileSystem' instance variable of Filter(Secure)DirectoryStream final?
        Hide
        Robert Muir added a comment -

        Updated patch with hard checks on unboxing. While this technically deviates from some of the APIs, I don't care, this is our tests, and we need to be able to debug them (not return false or no results silently).

        I also removed SecureDirectoryStream in these wrappers (its optional anyway, and quite complicated: we don't need any more of that), and fixed the hacky filesystem in TestIOUtils to be well-behaved. I fixed failures in the new tests if it got extrasfs as well.

        Show
        Robert Muir added a comment - Updated patch with hard checks on unboxing. While this technically deviates from some of the APIs, I don't care, this is our tests, and we need to be able to debug them (not return false or no results silently). I also removed SecureDirectoryStream in these wrappers (its optional anyway, and quite complicated: we don't need any more of that), and fixed the hacky filesystem in TestIOUtils to be well-behaved. I fixed failures in the new tests if it got extrasfs as well.
        Hide
        ASF subversion and git services added a comment -

        Commit 1673720 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1673720 ]

        LUCENE-6424: DirectoryStream doesn't wrap with FilterPath

        Show
        ASF subversion and git services added a comment - Commit 1673720 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1673720 ] LUCENE-6424 : DirectoryStream doesn't wrap with FilterPath
        Hide
        ASF subversion and git services added a comment -

        Commit 1673721 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1673721 ]

        LUCENE-6424: DirectoryStream doesn't wrap with FilterPath

        Show
        ASF subversion and git services added a comment - Commit 1673721 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1673721 ] LUCENE-6424 : DirectoryStream doesn't wrap with FilterPath
        Hide
        Simon Willnauer added a comment -

        thanks guys! you should have put all our names on the CHANGES.TXT

        Show
        Simon Willnauer added a comment - thanks guys! you should have put all our names on the CHANGES.TXT
        Hide
        ASF subversion and git services added a comment -

        Commit 1673783 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1673783 ]

        LUCENE-6424: fix names in CHANGES

        Show
        ASF subversion and git services added a comment - Commit 1673783 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1673783 ] LUCENE-6424 : fix names in CHANGES
        Hide
        ASF subversion and git services added a comment -

        Commit 1673784 from Robert Muir in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1673784 ]

        LUCENE-6424: fix names in CHANGES

        Show
        ASF subversion and git services added a comment - Commit 1673784 from Robert Muir in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1673784 ] LUCENE-6424 : fix names in CHANGES
        Hide
        Robert Muir added a comment -

        I fixed this Simon, thanks for tracking this one down!

        Show
        Robert Muir added a comment - I fixed this Simon, thanks for tracking this one down!
        Hide
        Simon Willnauer added a comment -

        thx anyway

        Show
        Simon Willnauer added a comment - thx anyway
        Hide
        Anshum Gupta added a comment -

        Bulk close for 5.2.0.

        Show
        Anshum Gupta added a comment - Bulk close for 5.2.0.

          People

          • Assignee:
            Unassigned
            Reporter:
            Ryan Ernst
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development