Ignore:
Timestamp:
2018-08-29T19:40:53+02:00 (6 years ago)
Author:
Don-vip
Message:

spotbugs - fix various issues found with Eclipse plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/gui/layer/AutosaveTaskTest.java

    r14138 r14201  
    1212import java.io.IOException;
    1313import java.nio.charset.StandardCharsets;
     14import java.nio.file.DirectoryStream;
    1415import java.nio.file.Files;
    1516import java.nio.file.Path;
     
    115116        }
    116117        // cleanup
    117         for (Path entry : Files.newDirectoryStream(task.getAutosaveDir(), "*.{osm,pid}")) {
    118             Files.delete(entry);
     118        try (DirectoryStream<Path> stream = Files.newDirectoryStream(task.getAutosaveDir(), "*.{osm,pid}")) {
     119            for (Path entry : stream) {
     120                Files.delete(entry);
     121            }
    119122        }
    120123    }
Note: See TracChangeset for help on using the changeset viewer.