On Fri, 20 Nov 2020 03:27:54 GMT, Mandy Chung <mch...@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

Reply via email to