From 277e0bfb48379930ee0e88f2c7cd633ad98b9a36 Mon Sep 17 00:00:00 2001 From: neil Date: Thu, 25 May 2017 18:09:58 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-2801=20=E5=85=B3=E6=8E=89=E8=AE=BE?= =?UTF-8?q?=E8=AE=A1=E5=99=A8=E8=8E=B7=E5=8F=96=E8=AE=BA=E5=9D=9B=E6=B6=88?= =?UTF-8?q?=E6=81=AF.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/LoginWebBridge.java | 12 ++++-------- .../com/fr/design/extra/exe/PluginLoginExecutor.java | 3 --- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/LoginWebBridge.java b/designer_base/src/com/fr/design/extra/LoginWebBridge.java index 6592e1601..5a23734fc 100644 --- a/designer_base/src/com/fr/design/extra/LoginWebBridge.java +++ b/designer_base/src/com/fr/design/extra/LoginWebBridge.java @@ -6,6 +6,7 @@ import com.fr.design.dialog.UIDialog; import com.fr.design.extra.ucenter.Client; import com.fr.design.extra.ucenter.XMLHelper; import com.fr.design.gui.ilable.UILabel; +import com.fr.general.ComparatorUtils; import com.fr.general.SiteCenter; import com.fr.general.http.HttpClient; import com.fr.json.JSONObject; @@ -108,9 +109,6 @@ public class LoginWebBridge { if (StringUtils.isEmpty(userName)) { return; } - if (StringUtils.isNotEmpty(this.userName)) { - updateMessageCount(); - } this.userName = userName; } @@ -143,15 +141,13 @@ public class LoginWebBridge { if (getMessage.isServerAlive()) { try { String res = getMessage.getResponseText(); - if (res.equals(FAILED_MESSAGE_STATUS)) { - } else { + if (!ComparatorUtils.equals(res, FAILED_MESSAGE_STATUS)) { JSONObject jo = new JSONObject(res); - if (jo.getString("status").equals(SUCCESS_MESSAGE_STATUS)) { + if (SUCCESS_MESSAGE_STATUS.equals(jo.optString("status"))) { setMessageCount(Integer.parseInt(jo.getString("message"))); } } - } catch (Exception e) { - FRContext.getLogger().info(e.getMessage()); + } catch (Exception ignore) { } } sleep(CHECK_MESSAGE_TIME); diff --git a/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java b/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java index c1101f800..c2c80aef0 100644 --- a/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java +++ b/designer_base/src/com/fr/design/extra/exe/PluginLoginExecutor.java @@ -38,9 +38,6 @@ public class PluginLoginExecutor implements Executor { @Override public void run(Process process) { String loginResult = LoginWebBridge.getHelper().login(username, password, uiLabel); - if (Integer.valueOf(loginResult) == 0) { - LoginWebBridge.getHelper().updateMessageCount(); - } result = loginResult; } }