Ignore:
Timestamp:
2018-05-01T21:51:12+02:00 (18 months ago)
Author:
Don-vip
Message:

fix PMD violations

File:
1 edited

Legend:

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

    r13697 r13698  
    44import java.io.ByteArrayOutputStream;
    55import java.io.File;
    6 import java.io.FileInputStream;
    76import java.io.IOException;
    87import java.io.InputStream;
    98import java.nio.charset.StandardCharsets;
     9import java.nio.file.Files;
    1010import java.text.ParseException;
    1111import java.util.Locale;
     
    4646        final int minimum_length = 0x64;
    4747        boolean isPotentiallyValid = false;
    48         try (InputStream fis = new FileInputStream(file)) {
     48        try (InputStream fis = Files.newInputStream(file.toPath())) {
    4949            isPotentiallyValid = file.isFile()
    5050                && file.getName().toLowerCase(Locale.ENGLISH).endsWith(".lnk")
     
    6262     */
    6363    public WindowsShortcut(File file) throws IOException, ParseException {
    64         try (InputStream in = new FileInputStream(file)) {
     64        try (InputStream in = Files.newInputStream(file.toPath())) {
    6565            parseLink(getBytes(in));
    6666        }
Note: See TracChangeset for help on using the changeset viewer.