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

Compile error in various DocValues formats with Java 8u20

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.8.1
    • 4.9, 6.0
    • core/index
    • New

    Description

      When compiling the codecs with Java 8 update 20 (coming soon), we fail: The constructors initialize a final closeable field inside a try block, which makes the field possibly undefined in the finally block.

      Previous Java versions somehow did not detect this bug, but it is a real one. Final fields must be initialized before they are used. Earlier compilers did not detect this bug, but I think it is not buggy, because IOUtils can handle null.

      Attachments

        1. LUCENE-5704.patch
          4 kB
          Uwe Schindler

        Activity

          uschindler Uwe Schindler added a comment -

          Patch.

          uschindler Uwe Schindler added a comment - Patch.

          Commit 1597299 from thetaphi in branch 'dev/trunk'
          [ https://svn.apache.org/r1597299 ]

          LUCENE-5704: Fix compilation error with Java 8u20

          jira-bot ASF subversion and git services added a comment - Commit 1597299 from thetaphi in branch 'dev/trunk' [ https://svn.apache.org/r1597299 ] LUCENE-5704 : Fix compilation error with Java 8u20

          Commit 1597301 from thetaphi in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1597301 ]

          Merged revision(s) 1597299 from lucene/dev/trunk:
          LUCENE-5704: Fix compilation error with Java 8u20

          jira-bot ASF subversion and git services added a comment - Commit 1597301 from thetaphi in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1597301 ] Merged revision(s) 1597299 from lucene/dev/trunk: LUCENE-5704 : Fix compilation error with Java 8u20
          uschindler Uwe Schindler added a comment -

          Please reopen when releasing 4.8.2, because this bug prevents compilation on recent JDK 8.

          uschindler Uwe Schindler added a comment - Please reopen when releasing 4.8.2, because this bug prevents compilation on recent JDK 8.
          tomoko Tomoko Uchida added a comment -

          This issue was moved to GitHub issue: #6766.

          tomoko Tomoko Uchida added a comment - This issue was moved to GitHub issue: #6766 .

          People

            uschindler Uwe Schindler
            uschindler Uwe Schindler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: