Bug 543404 - [Win32][SWT_AWT] An illegal reflective access operation
Replace two inaccessible reflective calls with JNI.
Previous fix (Bug 482318) appears to have missed them.
Change-Id: Id3c2ea9c5842810e91d965d35453d754032d6b91
Signed-off-by: Nikita Nemkin <nikita@nemkin.ru>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
index 400800d..0d79248 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/win32/org/eclipse/swt/awt/SWT_AWT.java
@@ -233,21 +233,13 @@
case SWT.Activate:
EventQueue.invokeLater(() -> {
if (frame.isActive()) return;
- try {
- Class<?> clazz = frame.getClass();
- Method method = clazz.getMethod("synthesizeWindowActivation", boolean.class);
- if (method != null) method.invoke(frame, Boolean.TRUE);
- } catch (Throwable e1) {}
+ synthesizeWindowActivation(frame, true);
});
break;
case SWT.Deactivate:
EventQueue.invokeLater(() -> {
if (!frame.isActive()) return;
- try {
- Class<?> clazz = frame.getClass();
- Method method = clazz.getMethod("synthesizeWindowActivation", boolean.class);
- if (method != null) method.invoke(frame, Boolean.FALSE);
- } catch (Throwable e1) {}
+ synthesizeWindowActivation(frame, false);
});
break;
}