Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
4.0-alpha1
-
None
-
None
Description
The timeunit parameter in the ctor of ConstantTimeToLiveExpirationPolicy is not used.
Additionally, the validateAndConvertToMillis method is wrong, it should be changed like this:
private static long validateAndConvertToMillis(final long timeToLive, final TimeUnit timeUnit) { if (timeUnit == null) { throw new IllegalArgumentException("Time unit must not be null"); } return TimeUnit.MILLISECONDS.convert(timeToLive, timeUnit); }