RFR(T) [TESTBUG] MismatchedWhiteBox test fails with missing WhiteBox$WhiteBoxPermission.class
Calvin Cheung
calvin.cheung at oracle.com
Mon Dec 16 23:13:33 UTC 2019
Looks good.
thanks,
Calvin
On 12/16/19 2:50 PM, Ioi Lam wrote:
> https://bugs.openjdk.java.net/browse/JDK-8236045
>
>
> After JDK-8199290, ClassFileInstaller is hard-coded to install
> WhiteBox$WhiteBoxPermission.class alongside WhiteBox.class. So in the
> MismatchedWhiteBox test, which creates a different version of the
> WhiteBox.class, we should have the inner class as well.
>
>
> diff -r 520a513294c3
> test/hotspot/jtreg/sanity/MismatchedWhiteBox/WhiteBox.java
> --- a/test/hotspot/jtreg/sanity/MismatchedWhiteBox/WhiteBox.java Mon
> Dec 16 14:30:12 2019 -0800
> +++ b/test/hotspot/jtreg/sanity/MismatchedWhiteBox/WhiteBox.java Mon
> Dec 16 14:48:30 2019 -0800
> @@ -36,6 +36,15 @@
> package sun.hotspot;
>
> public class WhiteBox {
> + @SuppressWarnings("serial")
> + public static class WhiteBoxPermission extends
> java.security.BasicPermission {
> + // ClassFileInstaller is hard-coded to copy
> WhiteBox$WhiteBoxPermission, so let's
> + // make a fake one here as well.
> + public WhiteBoxPermission(String s) {
> + super(s);
> + }
> + }
> +
> private static native void registerNatives();
> static { registerNatives(); }
> public native int notExistedMethod();
>
>
>
> Thanks
> - Ioi
More information about the hotspot-dev
mailing list