From af71eab8238cccbb887dee8d29dece846c6c3437 Mon Sep 17 00:00:00 2001 From: Lanlan Date: Wed, 7 Aug 2019 10:36:32 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-20303=20FR=E4=B8=AD=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E7=AE=A1=E7=90=86=E6=8A=A5=E9=94=99=E9=97=AA?= =?UTF-8?q?=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/extra/WebViewDlgHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java index 54ddcd8c0..a64158765 100644 --- a/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java +++ b/designer-base/src/main/java/com/fr/design/extra/WebViewDlgHelper.java @@ -12,6 +12,7 @@ import com.fr.general.IOUtils; import com.fr.general.CloudCenter; import com.fr.general.http.HttpClient; +import com.fr.general.http.HttpToolbox; import com.fr.json.JSONObject; import com.fr.log.FineLoggerFactory; import com.fr.plugin.PluginStoreConstants; @@ -301,10 +302,9 @@ public class WebViewDlgHelper { new SwingWorker() { @Override protected Void doInBackground() throws Exception { - HttpClient httpClient = new HttpClient(CloudCenter.getInstance().acquireUrlByKind("shop.plugin.update") + "?" + PluginUtils.FR_VERSION + "=" + ProductConstants.VERSION + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION")); - httpClient.asGet(); - if (httpClient.getResponseCode() == HttpURLConnection.HTTP_OK) { - String text = httpClient.getResponseText(); + String url = CloudCenter.getInstance().acquireUrlByKind("shop.plugin.update"); + if (url != null) { + String text = HttpToolbox.get(url + "?" + PluginUtils.FR_VERSION + "=" + ProductConstants.VERSION + "&version=" + PluginStoreConstants.getInstance().getProps("VERSION")); JSONObject resultJSONObject = new JSONObject(text); String isLatest = resultJSONObject.optString("result"); if (!ComparatorUtils.equals(isLatest, LATEST)) {