Changeset 8788 in josm for trunk/src/org
- Timestamp:
- 2015-09-22T23:13:53+02:00 (9 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java
r8787 r8788 126 126 } 127 127 128 /** 129 * Parse the given input source and return the dataset. 130 * 131 * @see OsmReader#parseDataSet(InputStream, ProgressMonitor) 132 */ 133 protected DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException { 134 return OsmReader.parseDataSet(source, progressMonitor); 135 } 136 128 137 @Override 129 138 public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException { … … 140 149 if (in == null) 141 150 return null; 142 ds = OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false));151 ds = parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false)); 143 152 } 144 153 … … 147 156 if (in == null) 148 157 return null; 149 ds2 = OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false));158 ds2 = parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false)); 150 159 } 151 160 if (ds2 == null) … … 159 168 if (in == null) 160 169 return null; 161 ds = OsmReader.parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false));170 ds = parseDataSet(in, progressMonitor.createSubTaskMonitor(1, false)); 162 171 } 163 172 } -
trunk/src/org/openstreetmap/josm/io/OverpassDownloadReader.java
r8787 r8788 5 5 6 6 import java.io.InputStream; 7 8 import javax.xml.stream.XMLStreamConstants; 9 import javax.xml.stream.XMLStreamException; 7 10 8 11 import org.openstreetmap.josm.data.Bounds; … … 107 110 108 111 @Override 112 protected DataSet parseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException { 113 return new OsmReader() { 114 @Override 115 protected void parseUnknown(boolean printWarning) throws XMLStreamException { 116 if ("remark".equals(parser.getLocalName())) { 117 if (parser.getEventType() == XMLStreamConstants.START_ELEMENT) { 118 final String text = parser.getElementText(); 119 if (text.contains("runtime error")) { 120 throw new XMLStreamException(text); 121 } 122 } 123 } 124 super.parseUnknown(printWarning); 125 } 126 }.doParseDataSet(source, progressMonitor); 127 } 128 129 @Override 109 130 public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException { 110 131
Note:
See TracChangeset
for help on using the changeset viewer.