Permalink
Browse files

[PAXWEB-373] Fixed annoying exception by correcting cast

Signed-off-by: Andreas Pieber <anpieber@gmail.com>
  • Loading branch information...
1 parent 502e364 commit a3b69dd48e9159099b56da75d09c09612750a31f @anpieber anpieber committed May 8, 2012
@@ -111,11 +111,11 @@ private boolean isTimeoutCandidate(final AbstractSession session, final long idl
return idleTime > 0 && session.getAccessed() + idleTime < now;
}
- private int getIdleSavePeriodMs() {
+ private long getIdleSavePeriodMs() {
try {
Field f = HashSessionManager.class.getDeclaredField("_idleSavePeriodMs");
f.setAccessible(true);
- return (Integer) f.get(this);
+ return (Long) f.get(this);
} catch (Exception e) {
throw new RuntimeException("Error accessing invisible HashSessionManager field via reflection", e);
}

0 comments on commit a3b69dd

Please sign in to comment.