This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 b927c4fcab Fix possible overflow
b927c4fcab is described below
commit b927c4fcabdcd36a9b5dfe3ea5aef6452ece0b79
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 9f55d98934..6a1863ed5f 100644
--- a/java/org/apache/catalina/session/ManagerBase.java
+++ b/java/org/apache/catalina/session/ManagerBase.java
@@ -803,7 +803,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]