This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 978013fb2a Consider value as well as key in equals()
978013fb2a is described below
commit 978013fb2a41a783a6dd163509631d743c681440
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Jul 10 08:36:29 2026 +0100
Consider value as well as key in equals()
---
.../apache/catalina/tribes/tipis/AbstractReplicatedMap.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
index ede6b1a3af..4b61a42f26 100644
--- a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
+++ b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
@@ -1775,9 +1775,16 @@ public abstract class AbstractReplicatedMap<K, V>
@SuppressWarnings("rawtypes")
MapEntry other = (MapEntry) o;
if (key == null) {
- return other.key == null;
+ if (value == null) {
+ return other.key == null && other.value == null;
+ } else {
+ return other.key == null && value.equals(other.value);
+ }
+ }
+ if (value == null) {
+ return key.equals(other.key) && other.value == null;
}
- return key.equals(other.key);
+ return key.equals(other.key) && value.equals(other.value);
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]