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 5d70d4ee16 Remove unnecessary code.
5d70d4ee16 is described below
commit 5d70d4ee16a3185a4e1a6211bd7d5044ecb0f293
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 14 14:01:59 2026 +0100
Remove unnecessary code.
java.sql.Timestamp extends java.util.Date
Fixes a CodeQl warning
---
java/org/apache/el/lang/ELSupport.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/el/lang/ELSupport.java
b/java/org/apache/el/lang/ELSupport.java
index 1733a4f5d2..1e36382082 100644
--- a/java/org/apache/el/lang/ELSupport.java
+++ b/java/org/apache/el/lang/ELSupport.java
@@ -24,7 +24,6 @@ import java.lang.reflect.Modifier;
import java.lang.reflect.Proxy;
import java.math.BigDecimal;
import java.math.BigInteger;
-import java.sql.Timestamp;
import java.time.Clock;
import java.time.Instant;
import java.time.temporal.TemporalAccessor;
@@ -795,9 +794,9 @@ public class ELSupport {
* @return true if either operand is a date-related type
*/
public static boolean isDateOp(final Object obj0, Object obj1) {
+ // java.sql.Timestamp is a sub-class of java.util.Date so an explicit
check is not required
return obj0 instanceof TemporalAccessor || obj1 instanceof
TemporalAccessor || obj0 instanceof Clock ||
- obj1 instanceof Clock || obj0 instanceof Date || obj1
instanceof Date || obj0 instanceof Timestamp ||
- obj1 instanceof Timestamp;
+ obj1 instanceof Clock || obj0 instanceof Date || obj1
instanceof Date;
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]