Ignore:
Timestamp:
2020-02-23T00:29:48+01:00 (5 years ago)
Author:
simon04
Message:

Use Utils.hashMapInitialCapacity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/StructUtils.java

    r15121 r15906  
    3434import org.openstreetmap.josm.tools.MultiMap;
    3535import org.openstreetmap.josm.tools.ReflectionUtils;
     36import org.openstreetmap.josm.tools.Utils;
    3637
    3738/**
     
    270271        try (JsonReader reader = Json.createReader(new StringReader(s))) {
    271272            JsonObject object = reader.readObject();
    272             ret = new HashMap(object.size());
     273            ret = new HashMap(Utils.hashMapInitialCapacity(object.size()));
    273274            for (Map.Entry<String, JsonValue> e: object.entrySet()) {
    274275                JsonValue value = e.getValue();
Note: See TracChangeset for help on using the changeset viewer.