[foreign-preview] RFR: 8282210: Relax policy for restricted method invocation [v2]

Julia Boes jboes at openjdk.java.net
Thu Feb 24 14:03:16 UTC 2022


On Thu, 24 Feb 2022 12:15:08 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> Nice test! One minor comment inline.

The test is based on the JDK 15 version of `tools/launcher/modules/illegalaccess/IllegalAccessTest.java`, Maurizio pointed me to it.

> test/jdk/java/foreign/enablenativeaccess/TestEnableNativeAccess.java line 182:
> 
>> 180:                 .outputTo(System.out)
>> 181:                 .errorTo(System.out);
>> 182:         if (expectedResult != null)
> 
> I don't see how `expectedResult` could be `null` here? If it is `null` unexpectedly, I think it would be better to fail here (to avoid false-positives).

Good point, I think it's safe to drop the null check as we don't pass null as `expectedResult` anywhere.

-------------

PR: https://git.openjdk.java.net/panama-foreign/pull/655


More information about the panama-dev mailing list