commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Created] (COLLECTIONS-475) Wrong timeout handling in expiration policies of PassiveExpiringMap
Date Tue, 02 Jul 2013 21:05:21 GMT
Thomas Neidhart created COLLECTIONS-475:
-------------------------------------------

             Summary: Wrong timeout handling in expiration policies of PassiveExpiringMap
                 Key: COLLECTIONS-475
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-475
             Project: Commons Collections
          Issue Type: Bug
    Affects Versions: 4.0-alpha1
            Reporter: Thomas Neidhart
            Priority: Minor
             Fix For: 4.0


The timeunit parameter in the ctor of ConstantTimeToLiveExpirationPolicy is not used.

Additionally, the validateAndConvertToMillis method is wrong, it should be changed like this:

{noformat}
    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);
}
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message