Ignore:
Timestamp:
2016-05-15T21:14:06+02:00 (10 years ago)
Author:
Don-vip
Message:

findbugs - fix/suppress most of warnings reported in unit tests + enable low confidence warnings for core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java

    r10219 r10222  
    222222            Process process = pb.start();
    223223            OutputStream stdin = process.getOutputStream();
    224             final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin, StandardCharsets.UTF_8));
    225224            InputStream stdout = process.getInputStream();
    226             final BufferedReader reader = new BufferedReader(new InputStreamReader(stdout, StandardCharsets.UTF_8));
    227             String input = String.format("%.9f %.9f\n", ll.lon(), ll.lat());
    228             writer.write(input);
    229             writer.close();
    230             output = reader.readLine();
    231             reader.close();
     225            try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin, StandardCharsets.UTF_8))) {
     226                writer.write(String.format("%.9f %.9f%n", ll.lon(), ll.lat()));
     227            }
     228            try (BufferedReader reader = new BufferedReader(new InputStreamReader(stdout, StandardCharsets.UTF_8))) {
     229                output = reader.readLine();
     230            }
    232231        } catch (IOException e) {
    233232            System.err.println("Error: Running external command failed: " + e + "\nCommand was: "+Utils.join(" ", args));
Note: See TracChangeset for help on using the changeset viewer.