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

forbidden-apis fails on Java 9 while parsing deprecated signatures

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.0
    • 5.0, 6.0
    • general/build
    • None
    • New

    Description

      -check-forbidden-all:
      [forbidden-apis] Reading bundled API signatures: jdk-unsafe-1.8
      [forbidden-apis] Reading bundled API signatures: jdk-deprecated-1.8
      
      BUILD FAILED
      /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/build.xml:515: The following error occurred while executing this line:
      /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/build.xml:86: The following error occurred while executing this line:
      /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/build.xml:101: The following error occurred while executing this line:
      /mnt/ssd/jenkins/workspace/Lucene-Solr-trunk-Linux/lucene/common-build.xml:2293: Parsing signatures failed: No method found with following signature: java.util.jar.Pack200$Packer#addPropertyChangeListener(java.beans.PropertyChangeListener)
      

      This is a really new thing:

      The method java.util.jar.Pack200$Packer#addPropertyChangeListener(java.beans.PropertyChangeListener) part of the JDK 8 deprecation list. But this method was actually removed in Java 9 completely (the first deprecation ever that was actually removed!). This method was deprecated in Java 8 for the first time, with the following text:

      "Deprecated. The dependency on PropertyChangeListener creates a significant impediment to future modularization of the Java platform. This method will be removed in a future release. Applications that need to monitor progress of the packer can poll the value of the PROGRESS property instead."

      So I am not sure how to handle that, it seems that in JDK9, Oracle may need to remove more deprecated stuff to make modularization possible. In branch_5x builds this is not a problem, because it was not deprecated in Java 8, so the java 7 signatures file does not have that method listed. A workaround would be to enable the forbidden feature to not fail on missing signatures.

      Attachments

        1. LUCENE-6070.patch
          2 kB
          Uwe Schindler

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment