Browse Source

REPORT-81270 远程连接配置界面处理IPV6格式的url

release/11.0
John.Ying 2 years ago
parent
commit
a6fcfbcde3
  1. 3
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java

3
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -75,6 +75,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
private UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK")); private UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK"));
private UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel")); private UIButton cancelButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Cancel"));
private UILabel uiLabel = new UILabel(); private UILabel uiLabel = new UILabel();
private String IPV6_JUDGE_SYMBOL = "[";
/** /**
* 是否启用 https 勾选框 * 是否启用 https 勾选框
@ -326,7 +327,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
? RemoteWorkspaceURL.createDefaultURL() ? RemoteWorkspaceURL.createDefaultURL()
: new RemoteWorkspaceURL(connection.getUrl()); : new RemoteWorkspaceURL(connection.getUrl());
//判断一下IP地址是不是IPV6的格式,如果是的话在拆分地址和端口的时候需要调整一下格式,用[ 或者 ] 判断 //判断一下IP地址是不是IPV6的格式,如果是的话在拆分地址和端口的时候需要调整一下格式,用[ 或者 ] 判断
if (!Strings.isNullOrEmpty(connection.getUrl()) && connection.getUrl().contains("[")) { if (!Strings.isNullOrEmpty(connection.getUrl()) && connection.getUrl().contains(IPV6_JUDGE_SYMBOL)) {
this.remoteWorkspaceURL.refreshIPV6Format(); this.remoteWorkspaceURL.refreshIPV6Format();
} }
String username = fromNullable(connection.getUserName()).or(StringUtils.EMPTY); String username = fromNullable(connection.getUserName()).or(StringUtils.EMPTY);

Loading…
Cancel
Save