From 5b0616e32e54a5f29ae9a6fb0a0d535932583ab0 Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 7 Jun 2018 09:45:43 +0800 Subject: [PATCH] =?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 6fbad6de4d..c43d7a7742 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 9efcd3a706..956625f13a 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