On Fri, 20 Nov 2020 13:08:11 GMT, Alan Bateman <al...@openjdk.org> wrote:
>> 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. Thanks for pointing that out. I fixed it by arranging for the `Add-Exports` test to export both `sun.security.x509` and `sun.nio.ch`. ------------- PR: https://git.openjdk.java.net/jdk/pull/1324