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

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


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

commit 16bf39b66f1ccc3f9e5ae4da187fac00e7a75771
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 404baf5932..792be32d93 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,10 +554,9 @@ 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
+            // enough, but two actions on the same item would override
             AttributeInfo other = (AttributeInfo) o;
-            return other.getType() == this.getType() && other.getAction() == 
this.getAction() &&
-                    other.getName().equals(this.getName());
+            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