Ignore:
Timestamp:
2014-05-01T02:34:43+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - global use of try-with-resources, according to

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/session/SessionWriter.java

    r7005 r7033  
    240240
    241241    public void write(File f) throws IOException {
    242         OutputStream out = null;
    243         try {
    244             out = new FileOutputStream(f);
     242        try (OutputStream out = new FileOutputStream(f)) {
     243            write(out);
    245244        } catch (FileNotFoundException e) {
    246245            throw new IOException(e);
    247246        }
    248         write(out);
    249247    }
    250248
     
    262260            writeJos(doc, new BufferedOutputStream(out));
    263261        }
    264         Utils.close(out);
    265262    }
    266263}
Note: See TracChangeset for help on using the changeset viewer.