From 81d637b585839f7201ec11bb6b2efd3dbc5d255d Mon Sep 17 00:00:00 2001 From: "LAPTOP-SB56SG4Q\\86185" Date: Thu, 4 Aug 2022 17:41:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=82=E9=85=8D=E6=96=B0=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E7=9A=84=E4=BA=A7=E5=93=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tptj/demo/hg/connection/conn/DemoConnection.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/com/tptj/demo/hg/connection/conn/DemoConnection.java b/src/main/java/com/tptj/demo/hg/connection/conn/DemoConnection.java index 00e8536..054c225 100644 --- a/src/main/java/com/tptj/demo/hg/connection/conn/DemoConnection.java +++ b/src/main/java/com/tptj/demo/hg/connection/conn/DemoConnection.java @@ -5,6 +5,7 @@ import com.fanruan.api.data.open.BaseConnection; import com.fanruan.api.i18n.I18nKit; import com.fanruan.api.util.StringKit; import com.fr.config.holder.Conf; +import com.fr.stable.StringUtils; import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLableReader; import com.fr.third.ibm.icu.impl.Assert; @@ -66,4 +67,13 @@ public class DemoConnection extends BaseConnection { return cloned; } + @Override + public boolean equals(Object obj) { + return super.equals(obj) && + DemoConnection.class.isInstance( obj ) + && StringUtils.equals( + DemoConnection.class.cast(obj).getKey(), getKey() + ); + } + }