Lucene - Core
  1. Lucene - Core
  2. LUCENE-5704

Compile error in various DocValues formats with Java 8u20

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.8.1
    • Fix Version/s: 4.9, 6.0
    • Component/s: core/index
    • Labels:
    • Lucene Fields:
      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.

      1. LUCENE-5704.patch
        4 kB
        Uwe Schindler

        Activity

        Hide
        Uwe Schindler added a comment -

        Patch.

        Show
        Uwe Schindler added a comment - Patch.
        Hide
        ASF subversion and git services added a comment -

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

        LUCENE-5704: Fix compilation error with Java 8u20

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

        Commit 1597301 from Uwe Schindler 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

        Show
        ASF subversion and git services added a comment - Commit 1597301 from Uwe Schindler 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
        Hide
        Uwe Schindler added a comment -

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

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

          People

          • Assignee:
            Uwe Schindler
            Reporter:
            Uwe Schindler
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development