Changeset 14266 in josm
- Timestamp:
- 2018-09-21T21:53:17+02:00 (6 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmChangeReader.java
r14101 r14266 113 113 case "comment": 114 114 text = parser.getAttributeValue(null, "text"); 115 jumpToEnd(); 115 116 break; 116 117 default: -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r14219 r14266 366 366 * @throws XMLStreamException if there is an error processing the underlying XML source 367 367 */ 368 pr ivatevoid jumpToEnd(boolean printWarning) throws XMLStreamException {368 protected final void jumpToEnd(boolean printWarning) throws XMLStreamException { 369 369 while (true) { 370 370 int event = parser.next(); … … 376 376 } 377 377 378 pr ivatevoid jumpToEnd() throws XMLStreamException {378 protected final void jumpToEnd() throws XMLStreamException { 379 379 jumpToEnd(true); 380 380 } -
trunk/test/unit/org/openstreetmap/josm/io/OsmChangeReaderTest.java
r14101 r14266 8 8 import java.nio.charset.StandardCharsets; 9 9 import java.util.Collection; 10 import java.util.Iterator; 10 11 11 12 import org.junit.Rule; … … 59 60 " <comment text=\"something\" />\r\n" + 60 61 " </note>\r\n" + 62 " <note lat=\"50.5\" lon=\"13.5\" id=\"-3\">\r\n" + 63 " <comment text=\"something else\" />\r\n" + 64 " </note>\r\n" + 61 65 " </create>\r\n" + 62 66 " <modify />\r\n" + 63 67 " <delete />").b; 64 Collection<Note> notes = nd.getNotes(); 65 assertEquals(1, notes.size()); 66 Note n = notes.iterator().next(); 68 Collection<Note> notes = nd.getSortedNotes(); 69 assertEquals(2, notes.size()); 70 Iterator<Note> iterator = notes.iterator(); 71 Note n = iterator.next(); 67 72 assertEquals(new LatLon(50.23887555404037, 13.358299552342795), n.getLatLon()); 68 73 assertEquals("something", n.getFirstComment().getText()); 74 n = iterator.next(); 75 assertEquals(new LatLon(50.5, 13.5), n.getLatLon()); 76 assertEquals("something else", n.getFirstComment().getText()); 69 77 } 70 78 }
Note:
See TracChangeset
for help on using the changeset viewer.