RFR: 8256299: Implement JEP 396: Strongly Encapsulate JDK Internals by Default [v3]
Alan Bateman
alanb at openjdk.java.net
Fri Nov 20 13:11:05 UTC 2020
On Fri, 20 Nov 2020 03:27:54 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Good point -- case added.
>
> Looks good.
testWithAddExportsInManifest create an executable JAR with "Add-Exports: java.base/sun.security.x509" in the manifest. It runs it twice, once without any options, the second with --illegal-access=permit, and checks there are no warnings in both cases. To test attempted deep reflection here would need the equivalent of setAccessibleNonPublicMemberNonExportedPackage that tries to access some privates in sun.security.x509. It's okay to use setAccessibleNonPublicMemberNonExportedPackage to test that privates in sun.nio.ch aren't accessible but it's not connected to the Add-Exports attribute in the JAR file.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1324
More information about the core-libs-dev
mailing list