This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 7fa85a3f22 Consider value as well as key in equals()
7fa85a3f22 is described below
commit 7fa85a3f224c96fa7a307737024c18f519e1744c
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 ad005129bf..9fbd52250b 100644
--- a/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
+++ b/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
@@ -1770,9 +1770,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]