Changeset 10223 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2016-05-16T04:05:58+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
-
Compression.java (modified) (2 diffs)
-
OsmReader.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/Compression.java
r9720 r10223 96 96 * @throws IOException if any I/O error occurs 97 97 */ 98 @SuppressWarnings("resource")99 98 public static InputStream getUncompressedFileInputStream(File file) throws IOException { 100 return byExtension(file.getName()).getUncompressedInputStream(new FileInputStream(file)); 99 FileInputStream in = new FileInputStream(file); 100 try { 101 return byExtension(file.getName()).getUncompressedInputStream(in); 102 } catch (IOException e) { 103 Utils.close(in); 104 throw e; 105 } 101 106 } 102 107 … … 129 134 * @throws IOException if any I/O error occurs 130 135 */ 131 @SuppressWarnings("resource")132 136 public static OutputStream getCompressedFileOutputStream(File file) throws IOException { 133 return byExtension(file.getName()).getCompressedOutputStream(new FileOutputStream(file)); 137 FileOutputStream out = new FileOutputStream(file); 138 try { 139 return byExtension(file.getName()).getCompressedOutputStream(out); 140 } catch (IOException e) { 141 Utils.close(out); 142 throw e; 143 } 134 144 } 135 145 } -
trunk/src/org/openstreetmap/josm/io/OsmReader.java
r10212 r10223 11 11 import java.util.Collection; 12 12 import java.util.List; 13 import java.util.Objects; 13 14 import java.util.regex.Matcher; 14 15 import java.util.regex.Pattern; … … 355 356 } 356 357 // Read changeset info if neither upload-changeset nor id are set, or if they are both set to the same value 357 if ( id ==uploadChangesetId|| (id != null && id.equals(uploadChangesetId))) {358 if (Objects.equals(id, uploadChangesetId)) { 358 359 uploadChangeset = new Changeset(id != null ? id.intValue() : 0); 359 360 while (true) {
Note:
See TracChangeset
for help on using the changeset viewer.
