This is an automated email from the ASF dual-hosted git repository.

rmaucher pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new f26d4c55b1 Actions override so it is possible to keep only the latest
f26d4c55b1 is described below

commit f26d4c55b144ff653bf5066d8f0baabf7bb05084
Author: remm <[email protected]>
AuthorDate: Fri Oct 2 17:02:59 2026 +0200

    Actions override so it is possible to keep only the latest
---
 java/org/apache/catalina/ha/session/DeltaRequest.java | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/java/org/apache/catalina/ha/session/DeltaRequest.java 
b/java/org/apache/catalina/ha/session/DeltaRequest.java
index c7d657f158..f2e41980cd 100644
--- a/java/org/apache/catalina/ha/session/DeltaRequest.java
+++ b/java/org/apache/catalina/ha/session/DeltaRequest.java
@@ -532,9 +532,8 @@ public class DeltaRequest implements Externalizable {
 
         @Override
         public int hashCode() {
-            // Must be consistent with equals() which compares name, type and
-            // action
-            return (name.hashCode() * 31 + type) * 31 + action;
+            // Must be consistent with equals() which compares name and type 
(while action overrides)
+            return name.hashCode() * 31 + type;
         }
 
         public String getName() {
@@ -555,9 +554,8 @@ public class DeltaRequest implements Externalizable {
             }
             // Attributes and notes are different stores and setting and
             // removing are different changes, so a name match alone is not
-            // enough to consider two actions as the same change
-            return other.getType() == this.getType() && other.getAction() == 
this.getAction() &&
-                    other.getName().equals(this.getName());
+            // enough, but two actions on the same item would override
+            return other.getType() == this.getType() && 
other.getName().equals(this.getName());
         }
 
         @Override


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to