Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
It would be better to consider integer(long) overflow when compare the time in DelegationTokenRenewer.
When compare time in DelegationTokenRenewer#DelayedTokenRemovalRunnable to cancel token , it will have problem when currentTimeMillis is close to Long.MAX_VALUE.
The safer way to compare time will compare the time difference:
change
if (e.getValue() < System.currentTimeMillis()) {
to
if (e.getValue() - System.currentTimeMillis() < 0) {