On 3/22/18 10:44 AM, Alan Bateman wrote:


On 22/03/2018 17:41, Phil Race wrote:
Bug: https://bugs.openjdk.java.net/browse/JDK-8200072
webrev: http://cr.openjdk.java.net/~prr/8200072/

jdk.internal.math is exported to java.desktop but it has never been needed,
except briefly, in the jake forest during JDK 9 development.
History is in the bug.
Looks good. We should run jdeps periodically to catch these.


Yes we should set up such automated task.  jdeps --check $MODULE will find unused qualified exports.

$ jdeps --check java.base
java.base (jrt:/java.base)
  [Unused qualified exports in java.base]
    exports jdk.internal.math to java.desktop
    exports jdk.internal.misc to java.sql,jdk.jdeps
    exports jdk.internal.org.objectweb.asm to jdk.internal.vm.ci
    exports jdk.internal.perf to java.desktop
    exports jdk.internal.vm.annotation to jdk.internal.vm.ci
    exports sun.net.www to jdk.incubator.httpclient
    exports sun.nio.ch to jdk.sctp
    exports sun.nio.cs to java.desktop
    exports sun.reflect.misc to java.xml
    exports sun.security.x509 to jdk.security.auth
    exports sun.text.resources to jdk.localedata

We will have to go through them if any package is accessed through reflection.   I create JDK-8200121 to track this.

Mandy

Reply via email to