From 386dd3a97c8f49cbf3a0136f483a9c7a6454a59a Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Thu, 17 Nov 2016 19:52:31 +0800 Subject: [PATCH 1/3] 1 1 --- designer_base/src/com/fr/design/extra/PluginHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index 4a4870ba23..6773704ed2 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -15,6 +15,7 @@ import com.fr.plugin.dependence.PluginDependenceUnit; import com.fr.stable.ArrayUtils; import com.fr.stable.EncodeConstants; import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; import com.fr.stable.project.ProjectConstants; import com.fr.stable.xml.XMLTools; @@ -47,6 +48,9 @@ public class PluginHelper { * @param p 下载百分比处理 */ public static void downloadPluginFile(String id, String username, String password, Process p) throws Exception { + if (StringUtils.isEmpty(id) || StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { + return; + } HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password)); if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { int totalSize = httpClient.getContentLength(); From e02e4d26139d94f26d37ed45c2f1e93eb894ccd9 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Fri, 18 Nov 2016 10:06:25 +0800 Subject: [PATCH 2/3] 1 1 --- designer_base/src/com/fr/design/extra/PluginHelper.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index 6773704ed2..f7597d383d 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -48,7 +48,10 @@ public class PluginHelper { * @param p 下载百分比处理 */ public static void downloadPluginFile(String id, String username, String password, Process p) throws Exception { - if (StringUtils.isEmpty(id) || StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { + if (StringUtils.isEmpty(id)) { + return; + } + if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { return; } HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password)); From a1d72bb047f93f95342e00a328b60561abde0218 Mon Sep 17 00:00:00 2001 From: PanLi320 <854954082@qq.com> Date: Mon, 21 Nov 2016 14:01:43 +0800 Subject: [PATCH 3/3] =?UTF-8?q?REPORT-809=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E7=82=B9=E5=87=BB=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E6=9B=B4=E6=96=B0=E4=BC=9A=E6=8F=90=E7=A4=BA=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E5=BA=94=E7=94=A8=E5=95=86=E5=BA=97=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/com/fr/design/extra/PluginHelper.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/designer_base/src/com/fr/design/extra/PluginHelper.java b/designer_base/src/com/fr/design/extra/PluginHelper.java index f7597d383d..ecaa34ea00 100644 --- a/designer_base/src/com/fr/design/extra/PluginHelper.java +++ b/designer_base/src/com/fr/design/extra/PluginHelper.java @@ -48,10 +48,7 @@ public class PluginHelper { * @param p 下载百分比处理 */ public static void downloadPluginFile(String id, String username, String password, Process p) throws Exception { - if (StringUtils.isEmpty(id)) { - return; - } - if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)) { + if (!PluginHelper.invalidUser(id, username, password)) { return; } HttpClient httpClient = new HttpClient(getDownloadPath(id, username, password)); @@ -79,6 +76,16 @@ public class PluginHelper { } } + private static boolean invalidUser(String id, String username, String password) { + if (StringUtils.isEmpty(id)) { + return false; + } else if (StringUtils.isEmpty(username) || StringUtils.isEmpty(password)){ + return false; + } else { + return true; + } + } + private static String getDownloadPath(String id, String username, String password) throws Exception { HashMap map = new HashMap(); map.put("id", id);