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

markt-asf 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 5440280d69 Fix a CodeQL warning
5440280d69 is described below

commit 5440280d691b99ee1a616ff85c0991454a06b63f
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 14 13:49:28 2026 +0100

    Fix a CodeQL warning
    
    Ensures sub-classes override equals (the current ones do).
---
 java/org/apache/tomcat/util/buf/AbstractChunk.java | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/java/org/apache/tomcat/util/buf/AbstractChunk.java 
b/java/org/apache/tomcat/util/buf/AbstractChunk.java
index 48501c899f..56e14c0f92 100644
--- a/java/org/apache/tomcat/util/buf/AbstractChunk.java
+++ b/java/org/apache/tomcat/util/buf/AbstractChunk.java
@@ -241,6 +241,15 @@ public abstract class AbstractChunk implements Cloneable, 
Serializable {
     }
 
 
+    /**
+     * {@inheritDoc}
+     * <p>
+     * Sub-classes must provide an equals implementation that is consistent 
with {@link AbstractChunk#hashCode()}.
+     */
+    @Override
+    public abstract boolean equals(Object obj);
+
+
     /**
      * Returns the hash code for this buffer.
      *


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

Reply via email to