From e347eae9ddbf7415d09b27843c0f940eb03133b8 Mon Sep 17 00:00:00 2001 From: hades Date: Thu, 28 May 2020 18:50:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=20feature=E6=89=93=E5=8C=85?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/mainframe/DesignerFrame.java | 3 ++- .../java/com/fr/design/os/impl/MacOsAddListenerAction.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java index 2cf8d8c35..69a262bdf 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java @@ -509,7 +509,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta if (OperatingSystem.isMacos()) { Class clazz = Class.forName("com.apple.eawt.Application"); BufferedImage icon = image.isEmpty() ? IOUtils.readImage("/com/fr/base/images/oem/logo.png") : image.get(image.size() - 1); - Reflect.on(Reflect.on(clazz).call("getApplication").get()).call("setDockIconImage", icon); + Object application = Reflect.on(clazz).call("getApplication").get(); + Reflect.on(application).call("setDockIconImage", icon); } else { this.setIconImages(image); } diff --git a/designer-base/src/main/java/com/fr/design/os/impl/MacOsAddListenerAction.java b/designer-base/src/main/java/com/fr/design/os/impl/MacOsAddListenerAction.java index 1ff796a1d..6386ecd73 100644 --- a/designer-base/src/main/java/com/fr/design/os/impl/MacOsAddListenerAction.java +++ b/designer-base/src/main/java/com/fr/design/os/impl/MacOsAddListenerAction.java @@ -28,7 +28,8 @@ public class MacOsAddListenerAction implements OSBasedAction { Object quitInstance = getProxy(quitHandler, "handleQuitRequestWith", new QuitAction()); Class aboutHandler = Class.forName("com.apple.eawt.AboutHandler"); Object aboutInstance = getProxy(aboutHandler, "handleAbout", new AboutAction()); - Reflect.on(Reflect.on(app).call("getApplication").get()).call("setQuitHandler", quitInstance) + Object application = Reflect.on(app).call("getApplication").get(); + Reflect.on(application).call("setQuitHandler", quitInstance) .call("setAboutHandler", aboutInstance); } catch (ClassNotFoundException e) { FineLoggerFactory.getLogger().error(e.getMessage(), e);