Changeset 6289 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2013-10-03T03:41:25+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/OsmBzip2Exporter.java
r5361 r6289 9 9 10 10 import org.apache.tools.bzip2.CBZip2OutputStream; 11 import org.openstreetmap.josm.tools.Utils; 12 11 13 public class OsmBzip2Exporter extends OsmExporter { 12 14 15 /** 16 * Constructs a new {@code OsmBzip2Exporter}. 17 */ 13 18 public OsmBzip2Exporter() { 14 19 super(OsmBzip2Importer.FILE_FILTER); … … 18 23 protected OutputStream getOutputStream(File file) throws FileNotFoundException, IOException { 19 24 OutputStream out = new FileOutputStream(file); 20 out.write('B'); 21 out.write('Z'); 22 out = new CBZip2OutputStream(out); 23 return out; 25 try { 26 out.write('B'); 27 out.write('Z'); 28 return new CBZip2OutputStream(out); 29 } catch (IOException e) { 30 Utils.close(out); 31 throw e; 32 } 24 33 } 25 34 } -
trunk/src/org/openstreetmap/josm/io/imagery/WMSImagery.java
r6268 r6289 228 228 for (Element child : crsChildren) { 229 229 String crs = (String) getContent(child); 230 if ( crs != null) {230 if (!crs.isEmpty()) { 231 231 String upperCase = crs.trim().toUpperCase(); 232 232 crsList.add(upperCase); … … 280 280 else { 281 281 String content = (String) getContent(child); 282 return ( content != null) ? content : empty;282 return (!content.isEmpty()) ? content : empty; 283 283 } 284 284 }
Note:
See TracChangeset
for help on using the changeset viewer.