From: BobHanson Date: Tue, 2 Jun 2020 16:54:55 +0000 (-0500) Subject: JAL-3446 test for simpler key mask operation X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d7111d39548c57836f77bd4403bf2d124fd78820;p=jalview.git JAL-3446 test for simpler key mask operation --- diff --git a/src/jalview/util/Platform.java b/src/jalview/util/Platform.java index 036ae17..6dbe549 100644 --- a/src/jalview/util/Platform.java +++ b/src/jalview/util/Platform.java @@ -112,10 +112,10 @@ public class Platform try { - Class tk = Toolkit.getDefaultToolkit().getClass(); - Method method = tk.getMethod("getMenuShortcutKeyMaskEx"); + Toolkit tk = Toolkit.getDefaultToolkit(); + Method method = tk.getClass().getMethod("getMenuShortcutKeyMaskEx"); if (method == null) - method = tk.getMethod("getMenuShortcutKeyMask"); + method = tk.getClass().getMethod("getMenuShortcutKeyMask"); SHORTCUT_KEY_MASK = ((int) method.invoke(tk, new Object[0])); if (SHORTCUT_KEY_MASK <= 0xF) { @@ -124,6 +124,7 @@ public class Platform } } catch (Exception e) { + e.printStackTrace(); } } }