Changeset 18656 in josm
- Timestamp:
- 2023-02-09T17:30:58+01:00 (22 months ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmJsonReader.java
r17822 r18656 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 5 6 import java.io.IOException; 6 7 import java.io.InputStream; 7 8 import java.util.Collection; … … 10 11 import javax.json.Json; 11 12 import javax.json.JsonArray; 13 import javax.json.JsonException; 12 14 import javax.json.JsonNumber; 13 15 import javax.json.JsonObject; … … 179 181 @Override 180 182 protected DataSet doParseDataSet(InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException { 181 return doParseDataSet(source, progressMonitor, ir -> { 182 setParser(Json.createParser(ir)); 183 parse(); 184 }); 183 try { 184 return doParseDataSet(source, progressMonitor, ir -> { 185 setParser(Json.createParser(ir)); 186 parse(); 187 }); 188 } catch (JsonException exception) { 189 if (exception.getCause() instanceof IOException) { 190 IllegalDataException ide = new IllegalDataException(exception.getCause()); 191 // PMD 7 should be able to figure out that this is not an issue. See https://github.com/pmd/pmd/issues/2134 . 192 ide.addSuppressed(exception); 193 throw ide; // NOPMD 194 } else { 195 throw exception; 196 } 197 } 185 198 } 186 199 -
trunk/src/org/openstreetmap/josm/tools/HttpClient.java
r18652 r18656 34 34 import org.openstreetmap.josm.io.auth.DefaultAuthenticator; 35 35 import org.openstreetmap.josm.spi.preferences.Config; 36 import org.openstreetmap.josm.tools.TextUtils;37 36 38 37 /**
Note:
See TracChangeset
for help on using the changeset viewer.