commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (COLLECTIONS-316) LRUMap constructor javadoc and behavior are inconsistent (maxSize cannot be less than 0)
Date Thu, 23 Apr 2009 03:37:47 GMT

     [ https://issues.apache.org/jira/browse/COLLECTIONS-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell updated COLLECTIONS-316:
--------------------------------------

    Fix Version/s: 3.3

> LRUMap constructor javadoc and behavior are inconsistent (maxSize cannot be less than
0)
> ----------------------------------------------------------------------------------------
>
>                 Key: COLLECTIONS-316
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-316
>             Project: Commons Collections
>          Issue Type: Bug
>          Components: Map
>    Affects Versions: 3.1
>         Environment: n/a
>            Reporter: ori
>            Priority: Minor
>             Fix For: 3.3
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> The LRUMap constructor specifies "@param maxSize  the maximum size of the map, -1 for
no limit"
> The first line is then:
>         if (maxSize < 1) {
>             throw new IllegalArgumentException("LRUMap max size must be greater than
0");
>         }
> There is nothing wrong with allowing a negative maxSize. This way the map can be used
to order elements relative to access time. I think the above code should be remove and the
javadoc should stay the same.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message