You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/02/24 03:18:20 UTC
[dubbo] branch master updated: an object MUST equals to itself.
(#7212)
This is an automated email from the ASF dual-hosted git repository.
liujun pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new 15fc5b4 an object MUST equals to itself. (#7212)
15fc5b4 is described below
commit 15fc5b473bbeb73b0a6c9ac02f2c8d7e0f6fbe82
Author: XenoAmess <xe...@gmail.com>
AuthorDate: Wed Feb 24 11:17:57 2021 +0800
an object MUST equals to itself. (#7212)
---
dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java | 3 +++
.../java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java | 6 ++++++
2 files changed, 9 insertions(+)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java b/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java
index 90e3415..790c476 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java
@@ -244,6 +244,9 @@ public class Parameters {
@Override
public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
return parameters.equals(o);
}
diff --git a/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java b/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java
index 2758bed..326b51e 100644
--- a/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java
+++ b/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java
@@ -137,6 +137,9 @@ public class ExpiringMap<K, V> implements Map<K, V> {
@Override
public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
return delegateMap.equals(obj);
}
@@ -226,6 +229,9 @@ public class ExpiringMap<K, V> implements Map<K, V> {
@Override
public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
return value.equals(obj);
}