commit | a63b47b8d811bd387ccda7edd7d1405139bd44d2 | [log] [tgz] |
---|---|---|
author | Michael Ochmann <michael.ochmann@sap.com> | Fri Jan 15 18:01:06 2016 +0100 |
committer | Michael Ochmann <michael.ochmann@sap.com> | Fri Jan 15 18:04:24 2016 +0100 |
tree | ef4980ae611f3cc534f7f17482d0767509803a1d | |
parent | d60261d09b22c5cbb02301cf56bf55a408e370f4 [diff] |
Avoid long overflow in AccessToken#isExpired() Change-Id: Ia21fe609f63f9b069dfd37e9b90e4cb59e6c4ab2 Signed-off-by: Michael Ochmann <michael.ochmann@sap.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/cfoauth/AccessToken.java b/src/main/java/com/googlesource/gerrit/plugins/cfoauth/AccessToken.java index a9af673..9ea32ed 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/cfoauth/AccessToken.java +++ b/src/main/java/com/googlesource/gerrit/plugins/cfoauth/AccessToken.java
@@ -72,7 +72,7 @@ * Returns <code>true</code> if this token has already expired. */ boolean isExpired() { - return System.currentTimeMillis() > expiresAt * 1000; + return System.currentTimeMillis() / 1000L > expiresAt; } /**