From fabe66bd5e3c480a5277c0519e474f30a895d871 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 6 Aug 2018 16:03:06 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-10386=20=E8=BF=9C=E7=A8=8B=E6=9D=83?= =?UTF-8?q?=E9=99=90=E4=BA=A4=E4=BA=92=E9=AA=8C=E6=94=B6=E9=97=AE=E9=A2=98?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/env/RemoteEnvPane.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java index ff4ec66608..fc41ae24ab 100644 --- a/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java +++ b/designer-base/src/main/java/com/fr/env/RemoteEnvPane.java @@ -523,9 +523,7 @@ public class RemoteEnvPane extends BasicBeanPane { DesignerEnvManager.getEnvManager().setCertificatePass(connection.getCertSecretKey()); try { return WorkContext.getConnector().testConnection(connection); - } catch (AuthException e) { - message.setText(Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Auth_Failed")); - uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon")); + } catch (AuthException ignored) { return null; } } @@ -534,13 +532,18 @@ public class RemoteEnvPane extends BasicBeanPane { protected void done() { okButton.setEnabled(true); try { - if (get()) { - message.setText(Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Successful")); - uiLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon")); - } else { - message.setText(Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Failed")); + Boolean result = get(); + if (result == null) { + message.setText(Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Auth_Failed")); uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon")); - + } else { + if (result) { + message.setText(Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Successful")); + uiLabel.setIcon(UIManager.getIcon("OptionPane.informationIcon")); + } else { + message.setText(Toolkit.i18nText("Fine-Designer_Basic_Remote_Connect_Failed")); + uiLabel.setIcon(UIManager.getIcon("OptionPane.errorIcon")); + } } } catch (InterruptedException | ExecutionException e) { FineLoggerFactory.getLogger().error(e, e.getMessage());