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

Potential resource leak in BigramDictionary.java

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: None
    • Component/s: modules/analysis
    • Labels:
    • Lucene Fields:
      New, Patch Available

      Description

      The input and output object streams are being closed in the try block. These resources will not be closed if an exception occurs in the try block

      We can use the finally block to explicitly close these resources or use the new try-with-resources construct where they are implicitly closed.

        Attachments

          Activity

            People

            • Assignee:
              thetaphi Uwe Schindler
              Reporter:
              rmp91 Rishabh Patel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: