Skip to content

Commit

Permalink
8236045: [TESTBUG] MismatchedWhiteBox test fails with missing WhiteBo…
Browse files Browse the repository at this point in the history
…x$WhiteBoxPermission.class

Reviewed-by: phh
Backport-of: 924720f
  • Loading branch information
sendaoYan authored and Paul Hohensee committed Jun 23, 2023
1 parent 513732d commit 4a7557e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/hotspot/jtreg/sanity/MismatchedWhiteBox/WhiteBox.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -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();
Expand Down

1 comment on commit 4a7557e

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.