Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-1686

Remove Unnecessary NULL check in FindSegmentsFile - cleanup

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.9, 3.0
    • None
    • None
    • New, Patch Available

    Description

      FindSegmentsFile accesses the member "directory" in line 579 while performing a null check in 592. The null check is unnecessary as if directory is null line 579 would throw a NPE.
      I removed the null check and made the member "directory" final. In addition I added a null check in the constructor as If the value is null we should catch it asap.

      Attachments

        1. segments_info.patch
          4 kB
          Simon Willnauer

        Activity

          People

            uschindler Uwe Schindler
            simonw Simon Willnauer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: