This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new feb3ebb776 Fix possible overflow
feb3ebb776 is described below
commit feb3ebb77600f9806cc888fb6694e00804045d01
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Oct 14 08:11:54 2026 +0100
Fix possible overflow
---
java/org/apache/catalina/session/ManagerBase.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/org/apache/catalina/session/ManagerBase.java
b/java/org/apache/catalina/session/ManagerBase.java
index b499eb62cb..a5f5654fa3 100644
--- a/java/org/apache/catalina/session/ManagerBase.java
+++ b/java/org/apache/catalina/session/ManagerBase.java
@@ -811,7 +811,7 @@ public abstract class ManagerBase extends
LifecycleMBeanBase implements Manager
// the manager because it is being persisted - update the expired stats
if (update) {
long timeNow = System.currentTimeMillis();
- int timeAlive = (int) (timeNow -
session.getCreationTimeInternal()) / 1000;
+ int timeAlive = (int) ((timeNow -
session.getCreationTimeInternal()) / 1000L);
updateSessionMaxAliveTime(timeAlive);
expiredSessions.incrementAndGet();
SessionTiming timing = new SessionTiming(timeNow, timeAlive);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]