jdk/test/java/awt/regtesthelpers/Util.java
changeset 44545 83b611b88ac8
parent 36511 9d0388c6b336
equal deleted inserted replaced
44480:2c33418a6d57 44545:83b611b88ac8
   443             return -1;
   443             return -1;
   444         }
   444         }
   445 
   445 
   446         try {
   446         try {
   447             final Class _clazz = clazz;
   447             final Class _clazz = clazz;
   448             Method m_addExports = Class.forName("java.awt.Helper").getDeclaredMethod("addExports", String.class, java.lang.reflect.Module.class);
   448             Method m_addExports = Class.forName("java.awt.Helper").getDeclaredMethod("addExports", String.class, java.lang.Module.class);
   449             // No MToolkit anymore: nothing to do about it.
   449             // No MToolkit anymore: nothing to do about it.
   450             // We may be called from non-X11 system, and this permission cannot be delegated to a test.
   450             // We may be called from non-X11 system, and this permission cannot be delegated to a test.
   451             m_addExports.invoke(null, "sun.awt.X11", Util.class.getModule());
   451             m_addExports.invoke(null, "sun.awt.X11", Util.class.getModule());
   452             Method m_getWMID = (Method)AccessController.doPrivileged(new PrivilegedAction() {
   452             Method m_getWMID = (Method)AccessController.doPrivileged(new PrivilegedAction() {
   453                     public Object run() {
   453                     public Object run() {