Changeset 14314 in josm


Ignore:
Timestamp:
2018-10-12T22:24:27+02:00 (8 months ago)
Author:
Don-vip
Message:

fix #16834 - IAE when opening .osmc containing empty note created by OsmAnd

Location:
trunk
Files:
2 edited

Legend:

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

    r14266 r14314  
    122122            }
    123123        }
    124         if (location != null && text != null) {
     124        if (location != null && text != null && !text.isEmpty()) {
    125125            noteData.createNote(location, text);
    126126        }
  • trunk/test/unit/org/openstreetmap/josm/io/OsmChangeReaderTest.java

    r14266 r14314  
    6363                "      <comment text=\"something else\" />\r\n" +
    6464                "    </note>\r\n" +
     65                "    <note lat=\"50.75\" lon=\"13.75\" id=\"-4\">\r\n" +
     66                "      <comment text=\"\" />\r\n" +
     67                "    </note>\r\n" +
    6568                "  </create>\r\n" +
    6669                "  <modify />\r\n" +
Note: See TracChangeset for help on using the changeset viewer.