From d7111d39548c57836f77bd4403bf2d124fd78820 Mon Sep 17 00:00:00 2001 From: BobHanson Date: Tue, 2 Jun 2020 11:54:55 -0500 Subject: [PATCH] JAL-3446 test for simpler key mask operation --- src/jalview/util/Platform.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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(); } } } -- 1.7.10.2