Fix overflow in JdbcOperationsSessionRepository

Changed maxInactiveIntervalSeconds to long in order to prevent integer
overflow in cleanUpExpiredSessions method.

Fixes gh-564
This commit is contained in:
pasali
2016-06-29 17:34:09 +03:00
committed by Rob Winch
parent 82cb417910
commit 940555653c

View File

@@ -464,7 +464,7 @@ public class JdbcOperationsSessionRepository implements
@Scheduled(cron = "0 * * * * *")
public void cleanUpExpiredSessions() {
long now = System.currentTimeMillis();
int maxInactiveIntervalSeconds = (this.defaultMaxInactiveInterval != null)
long maxInactiveIntervalSeconds = (this.defaultMaxInactiveInterval != null)
? this.defaultMaxInactiveInterval
: MapSession.DEFAULT_MAX_INACTIVE_INTERVAL_SECONDS;