RFR 8075618: Create tests to check jarsigner work with multi-version jar
Wang Weijun
weijun.wang at oracle.com
Mon Dec 19 06:23:00 UTC 2016
> Please see updated webrev : http://cr.openjdk.java.net/~amjiang/8075618/webrev.04/ (also attached)
>
> I moved the checkPermission() calls into v9/bersion/Version.java, but I did not check if the output contains "I'm running on version 9", I think it does not make sense to make test fail with later or earlier version of Java (10 or 8).
This test will run in JDK 10 and your checkPermission(perm,bool) method will not get called. Suppose a regression is introduced one day that breaks the access control checking, this test will not be able to catch it.
If you check for the "version 9" string, the test will fail which reminds you to move the checkPermission call to Version.java of JDK 10 and it will catch that regression.
Thanks
Max
More information about the security-dev
mailing list