Changeset 11523 in josm for trunk/src


Ignore:
Timestamp:
2017-02-01T00:45:49+01:00 (3 years ago)
Author:
Don-vip
Message:

capabilities: update javadoc to new default values, code cleanup

File:
1 edited

Legend:

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

    r11453 r11523  
    3131 *     <tracepoints per_page="5000"/>
    3232 *     <waynodes maximum="2000"/>
    33  *     <changesets maximum_elements="50000"/>
     33 *     <changesets maximum_elements="10000"/>
    3434 *     <timeout seconds="300"/>
     35 *     <status database="online" api="online" gpx="online"/>
    3536 *   </api>
    3637 *   <policy>
     
    132133        } else {
    133134            if (!capabilities.containsKey(element)) {
    134                 Map<String, String> h = new HashMap<>();
    135                 capabilities.put(element, h);
    136             }
    137             Map<String, String> e = capabilities.get(element);
    138             e.put(attribute, value);
     135                capabilities.put(element, new HashMap<>());
     136            }
     137            capabilities.get(element).put(attribute, value);
    139138        }
    140139    }
     
    155154    public boolean supportsVersion(String version) {
    156155        return get("version", "minimum").compareTo(version) <= 0
    157         && get("version", "maximum").compareTo(version) >= 0;
     156            && get("version", "maximum").compareTo(version) >= 0;
    158157    }
    159158
Note: See TracChangeset for help on using the changeset viewer.