From d396dbd385e5793465c227a9f4ea07989a5aeb62 Mon Sep 17 00:00:00 2001 From: rinoux Date: Thu, 21 Jun 2018 12:12:39 +0800 Subject: [PATCH] =?UTF-8?q?DEC-2558=20URL=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tabledata/tabledatapane/FileTableDataPane.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/designer-base/src/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java b/designer-base/src/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java index 16d9966a11..a3e6efa5f1 100644 --- a/designer-base/src/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java +++ b/designer-base/src/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java @@ -61,6 +61,8 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.net.MalformedURLException; +import java.net.URL; import java.util.ArrayList; import java.util.List; @@ -318,7 +320,13 @@ public class FileTableDataPane extends AbstractTableDataPane { } private boolean checkURL(String uri){ - return (uri.matches("https*://.+|\\$\\{.+\\}.*")); + try { + new URL(uri); + return true; + } catch (MalformedURLException e) { + return false; + } + // return (uri.matches("https*://.+|\\$\\{.+\\}.*")); } private JPanel textSetPanel(int width,int height) {