Changeset 11509 in josm for trunk/src/org
- Timestamp:
- 2017-01-29T19:24:14+01:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r11455 r11509 283 283 for (String i : args.get(Option.LOAD_PREFERENCES)) { 284 284 info("Reading preferences from " + i); 285 try (InputStream is = HttpClient.create(new URL(i)).connect().getContent()) {285 try (InputStream is = openStream(new URL(i))) { 286 286 config.openAndReadXML(is); 287 287 } catch (IOException ex) { … … 382 382 info("Enabled EDT checker, wrongful access to gui from non EDT thread will be printed to console"); 383 383 RepaintManager.setCurrentManager(new CheckThreadViolationRepaintManager()); 384 } 385 } 386 387 private static InputStream openStream(URL url) throws IOException { 388 if ("file".equals(url.getProtocol())) { 389 return url.openStream(); 390 } else { 391 return HttpClient.create(url).connect().getContent(); 384 392 } 385 393 }
Note:
See TracChangeset
for help on using the changeset viewer.