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

Use Collections.singletonMap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/GeoJSONWriter.java

    r15429 r15905  
    66import java.math.RoundingMode;
    77import java.util.Collection;
    8 import java.util.HashMap;
     8import java.util.Collections;
    99import java.util.HashSet;
    1010import java.util.Iterator;
     
    8080    public String write(boolean pretty) {
    8181        StringWriter stringWriter = new StringWriter();
    82         Map<String, Object> config = new HashMap<>(1);
    83         config.put(JsonGenerator.PRETTY_PRINTING, pretty);
     82        Map<String, Object> config = Collections.singletonMap(JsonGenerator.PRETTY_PRINTING, pretty);
    8483        try (JsonWriter writer = Json.createWriterFactory(config).createWriter(stringWriter)) {
    8584            JsonObjectBuilder object = Json.createObjectBuilder()
Note: See TracChangeset for help on using the changeset viewer.