Ignore:
Timestamp:
2016-01-06T00:39:35+01:00 (8 years ago)
Author:
simon04
Message:

OsmReader: do not inform about undefined elements send from Overpass API

This gets rid of:

Undefined element 'node' found in input stream. Skipping.
Undefined element 'meta' found in input stream. Skipping.

File:
1 edited

Legend:

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

    r9231 r9326  
    384384
    385385    protected void parseUnknown(boolean printWarning) throws XMLStreamException {
    386         if (printWarning) {
    387             Main.info(tr("Undefined element ''{0}'' found in input stream. Skipping.", parser.getLocalName()));
     386        final String element = parser.getLocalName();
     387        if (printWarning && ("note".equals(element) || "meta".equals(element))) {
     388            // we know that Overpass API returns those elements
     389            Main.debug(tr("Undefined element ''{0}'' found in input stream. Skipping.", element));
     390        } else if (printWarning) {
     391            Main.info(tr("Undefined element ''{0}'' found in input stream. Skipping.", element));
    388392        }
    389393        while (true) {
Note: See TracChangeset for help on using the changeset viewer.