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

Remove Unnecessary NULL check in FindSegmentsFile - cleanup

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9, 3.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              simonw Simon Willnauer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: