From fe5a53124899398a6d47f56ca4f1df91c68cfdac Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 7 Jun 2018 09:29:31 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-8526=2010.0=E5=AE=9A=E4=B9=89=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E8=BF=9E=E6=8E=A5=E8=B6=85=E8=BF=87=E4=B8=89=E4=B8=AA?= =?UTF-8?q?=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 956625f13a..9efcd3a706 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