8273357: SecurityManager deprecation warning from java/awt/regtesthelpers/Util.java

Reviewed-by: kizune, aivanov
This commit is contained in:
Phil Race 2022-12-05 17:54:15 +00:00
parent 6a7a0db587
commit 601264d97d

View File

@ -450,6 +450,7 @@ public final class Util {
Method m_addExports = Class.forName("java.awt.Helper").getDeclaredMethod("addExports", String.class, java.lang.Module.class);
// We may be called from non-X11 system, and this permission cannot be delegated to a test.
m_addExports.invoke(null, "sun.awt.X11", Util.class.getModule());
@SuppressWarnings("removal")
Method m_getWMID = (Method)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
try {