[
https://issues.apache.org/jira/browse/LUCENE-6070?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Uwe Schindler updated LUCENE-6070:
----------------------------------
Attachment: LUCENE-6070.patch
Attached is a patch that updates forbidden-apis to the snapshot version 1.7. I
am working on releasing that one this evening, I just have to solve some
documentation issues.
With the attached patch using the snapshot version, forbidden-apis passes with
Java 9, showing just those warnings:
{noformat}
-check-forbidden-all:
[forbidden-apis] Reading bundled API signatures: jdk-unsafe-1.8
[forbidden-apis] Reading bundled API signatures: jdk-deprecated-1.8
[forbidden-apis] WARNING: Method not found while parsing signature:
java.util.jar.Pack200$Packer#addPropertyChangeListener(java.beans.PropertyChangeListener)
[signature ignored]
[forbidden-apis] WARNING: Method not found while parsing signature:
java.util.jar.Pack200$Packer#removePropertyChangeListener(java.beans.PropertyChangeListener)
[signature ignored]
[forbidden-apis] WARNING: Method not found while parsing signature:
java.util.jar.Pack200$Unpacker#addPropertyChangeListener(java.beans.PropertyChangeListener)
[signature ignored]
[forbidden-apis] WARNING: Method not found while parsing signature:
java.util.jar.Pack200$Unpacker#removePropertyChangeListener(java.beans.PropertyChangeListener)
[signature ignored]
[forbidden-apis] WARNING: Method not found while parsing signature:
java.util.logging.LogManager#addPropertyChangeListener(java.beans.PropertyChangeListener)
[signature ignored]
[forbidden-apis] WARNING: Method not found while parsing signature:
java.util.logging.LogManager#removePropertyChangeListener(java.beans.PropertyChangeListener)
[signature ignored]
[forbidden-apis] Reading API signatures: C:\Users\Uwe
Schindler\Projects\lucene\trunk-lusolr1\lucene\tools\forbiddenApis\base.txt
[forbidden-apis] Reading API signatures: C:\Users\Uwe
Schindler\Projects\lucene\trunk-lusolr1\lucene\tools\forbiddenApis\lucene.txt
[forbidden-apis] Loading classes to check...
[forbidden-apis] Scanning for API signatures and dependencies...
[forbidden-apis] Scanned 2463 (and 555 related) class file(s) for forbidden API
invocations (in 2.54s), 0 error(s).
{noformat}
As you see, Oracle already removed 6 deprecated methods of Java 8 in coming
Java 9.
> forbidden-apis fails on Java 9 while parsing deprecated signatures
> ------------------------------------------------------------------
>
> Key: LUCENE-6070
> URL: https://issues.apache.org/jira/browse/LUCENE-6070
> Project: Lucene - Core
> Issue Type: Bug
> Components: general/build
> Affects Versions: Trunk
> Reporter: Uwe Schindler
> Assignee: Uwe Schindler
> Fix For: Trunk
>
> Attachments: LUCENE-6070.patch
>
>
> {noformat}
> -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)
> {noformat}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]