Browse Source

DEC-2558 URL校验

master
rinoux 6 years ago
parent
commit
d396dbd385
  1. 10
      designer-base/src/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java

10
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<FileTableData> {
}
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) {

Loading…
Cancel
Save