Uploaded image for project: 'Commons Collections'
  1. Commons Collections
  2. COLLECTIONS-475

Wrong timeout handling in expiration policies of PassiveExpiringMap

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.0-alpha1
    • 4.0
    • 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);
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            tn Thomas Neidhart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: