From fe5a53124899398a6d47f56ca4f1df91c68cfdac Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 7 Jun 2018 09:29:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?REPORT-8526=2010.0=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=BF=9E=E6=8E=A5=E8=B6=85=E8=BF=87=E4=B8=89?= =?UTF-8?q?=E4=B8=AA=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../data/datapane/connect/ConnectionListPane.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java index 956625f13..9efcd3a70 100644 --- a/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -1,5 +1,6 @@ package com.fr.design.data.datapane.connect; +import com.fr.config.utils.UniqueKey; import com.fr.data.impl.Connection; import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection; @@ -12,6 +13,7 @@ import com.fr.file.ConnectionConfig; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.general.NameObject; +import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import com.fr.stable.StringUtils; @@ -154,7 +156,15 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh for (int i = 0; i < res_array.length; i++) { NameObject nameObject = res_array[i]; - connectionConfig.addConnection(nameObject.getName(), (Connection) nameObject.getObject()); + if(nameObject.getObject() instanceof UniqueKey){ + try{ + Connection cloneConnection = (Connection)((UniqueKey)nameObject.getObject()).clone(); + connectionConfig.addConnection(nameObject.getName(), cloneConnection); + }catch (Exception e){ + FineLoggerFactory.getLogger().error(e.getMessage(), e); + } + } + } } } \ No newline at end of file From 5b0616e32e54a5f29ae9a6fb0a0d535932583ab0 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 7 Jun 2018 09:45:43 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/server/ConnectionListAction.java | 3 ++- .../data/datapane/connect/ConnectionListPane.java | 12 +----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java b/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java index 6fbad6de4..c43d7a774 100644 --- a/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java +++ b/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java @@ -63,7 +63,8 @@ public class ConnectionListAction extends UpdateAction { final ConnectionConfig datasourceManager = ConnectionConfig.getInstance(); final ConnectionManagerPane databaseManagerPane = new ConnectionManagerPane() { public void complete() { - populate(datasourceManager); + ConnectionConfig clone = datasourceManager.mirror(); + populate(clone); } protected void renameConnection(String oldName, String newName) { diff --git a/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java b/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java index 9efcd3a70..956625f13 100644 --- a/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java +++ b/designer-base/src/com/fr/design/data/datapane/connect/ConnectionListPane.java @@ -1,6 +1,5 @@ package com.fr.design.data.datapane.connect; -import com.fr.config.utils.UniqueKey; import com.fr.data.impl.Connection; import com.fr.data.impl.JDBCDatabaseConnection; import com.fr.data.impl.JNDIDatabaseConnection; @@ -13,7 +12,6 @@ import com.fr.file.ConnectionConfig; import com.fr.general.ComparatorUtils; import com.fr.general.Inter; import com.fr.general.NameObject; -import com.fr.log.FineLoggerFactory; import com.fr.stable.ArrayUtils; import com.fr.stable.Nameable; import com.fr.stable.StringUtils; @@ -156,15 +154,7 @@ public class ConnectionListPane extends JListControlPane implements ConnectionSh for (int i = 0; i < res_array.length; i++) { NameObject nameObject = res_array[i]; - if(nameObject.getObject() instanceof UniqueKey){ - try{ - Connection cloneConnection = (Connection)((UniqueKey)nameObject.getObject()).clone(); - connectionConfig.addConnection(nameObject.getName(), cloneConnection); - }catch (Exception e){ - FineLoggerFactory.getLogger().error(e.getMessage(), e); - } - } - + connectionConfig.addConnection(nameObject.getName(), (Connection) nameObject.getObject()); } } } \ No newline at end of file From 6c703d6b94f39e6b2c6307a7e04e0f4d035a9621 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 7 Jun 2018 09:46:29 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=8F=98=E9=87=8F=E5=90=8D=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/actions/server/ConnectionListAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java b/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java index c43d7a774..c69ffc5b0 100644 --- a/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java +++ b/designer-base/src/com/fr/design/actions/server/ConnectionListAction.java @@ -63,8 +63,8 @@ public class ConnectionListAction extends UpdateAction { final ConnectionConfig datasourceManager = ConnectionConfig.getInstance(); final ConnectionManagerPane databaseManagerPane = new ConnectionManagerPane() { public void complete() { - ConnectionConfig clone = datasourceManager.mirror(); - populate(clone); + ConnectionConfig connectionConfig = datasourceManager.mirror(); + populate(connectionConfig); } protected void renameConnection(String oldName, String newName) {