1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
Description: Fixes the build failure with Java 9
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://github.com/java-native-access/jna/issues/856
Bug-Debian: https://bugs.debian.org/874649
--- a/contrib/platform/src/com/sun/jna/platform/WindowUtils.java
+++ b/contrib/platform/src/com/sun/jna/platform/WindowUtils.java
@@ -1389,14 +1389,7 @@
whenDisplayable(w, new Runnable() {
@Override
public void run() {
- Object peer = w.getPeer();
- try {
- Class<?> cls = peer.getClass();
- Method m = cls.getMethod("setAlpha", new Class[]{ float.class });
- m.invoke(peer, Float.valueOf(alpha));
- }
- catch (Exception e) {
- }
+ w.setOpacity(alpha);
}
});
}
|