Changeset 8129 in josm for trunk/src/org


Ignore:
Timestamp:
2015-03-09T00:07:50+01:00 (10 years ago)
Author:
Don-vip
Message:

fix Sonar issue findbugs:OS_OPEN_STREAM - Bad practice - Method may fail to close stream

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/PlatformHookUnixoid.java

    r8099 r8129  
    486486            return;
    487487        }
    488         try {
     488        try (FileInputStream fis = new FileInputStream(templateFile.toFile())) {
    489489            Properties props = new Properties();
    490             props.load(new FileInputStream(templateFile.toFile()));
     490            props.load(fis);
    491491            byte[] content = Files.readAllBytes(templateFile);
    492492            File cachePath = Main.pref.getCacheDirectory();
Note: See TracChangeset for help on using the changeset viewer.