Changeset 15070 in josm for trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
- Timestamp:
- 2019-05-11T20:24:40+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/session/SessionReader.java
r14741 r15070 565 565 throw new IllegalStateException("Importer " + imp + " returned null for " + support); 566 566 } 567 } catch (IllegalDataException | Illegal StateException | IOException ex) {567 } catch (IllegalDataException | IllegalArgumentException | IllegalStateException | IOException ex) { 568 568 exception = ex; 569 569 } … … 704 704 public void loadSession(File sessionFile, boolean zip, ProgressMonitor progressMonitor) throws IllegalDataException, IOException { 705 705 try (InputStream josIS = createInputStream(sessionFile, zip)) { 706 loadSession(josIS, sessionFile.toURI(), zip, progressMonitor != null ? progressMonitor : NullProgressMonitor.INSTANCE);706 loadSession(josIS, sessionFile.toURI(), zip, progressMonitor); 707 707 } 708 708 } … … 737 737 } 738 738 739 private void loadSession(InputStream josIS, URI sessionFileURI, boolean zip, ProgressMonitor progressMonitor) 739 /** 740 * Loads session from the given input stream. 741 * @param josIS session stream to load 742 * @param zip {@code true} if it's a zipped session (.joz) 743 * @param sessionFileURI URI of the underlying session file 744 * @param progressMonitor progress monitor 745 * @throws IllegalDataException if invalid data is detected 746 * @throws IOException if any I/O error occurs 747 * @since xxx 748 */ 749 public void loadSession(InputStream josIS, URI sessionFileURI, boolean zip, ProgressMonitor progressMonitor) 740 750 throws IOException, IllegalDataException { 741 751 … … 744 754 745 755 try { 746 parseJos(XmlUtils.parseSafeDOM(josIS), progressMonitor );756 parseJos(XmlUtils.parseSafeDOM(josIS), progressMonitor != null ? progressMonitor : NullProgressMonitor.INSTANCE); 747 757 } catch (SAXException e) { 748 758 throw new IllegalDataException(e);
Note:
See TracChangeset
for help on using the changeset viewer.