Changeset 4374 in josm for trunk/src/org/openstreetmap/josm/data/Preferences.java
- Timestamp:
- 2011-08-28T13:58:57+02:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/Preferences.java
r4371 r4374 745 745 */ 746 746 public boolean putCollectionBounded(String key, int maxsize, Collection<String> val) { 747 Collection<String> newCollection = new ArrayList<String>( maxsize);747 Collection<String> newCollection = new ArrayList<String>(Math.min(maxsize, val.size())); 748 748 for (String i : val) { 749 749 if (newCollection.size() >= maxsize) {
Note:
See TracChangeset
for help on using the changeset viewer.
