Changeset 10219 in josm


Ignore:
Timestamp:
2016-05-15T18:48:35+02:00 (4 years ago)
Author:
Don-vip
Message:

findbugs - reliance on default encoding

Location:
trunk/test/unit/org/openstreetmap/josm/data
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJobTest.java

    r9973 r10219  
    77import java.net.MalformedURLException;
    88import java.net.URL;
     9import java.nio.charset.StandardCharsets;
    910
    1011import org.apache.commons.jcs.access.behavior.ICacheAccess;
     
    4647        @Override
    4748        protected CacheEntry createCacheEntry(byte[] content) {
    48             return new CacheEntry("dummy".getBytes());
     49            return new CacheEntry("dummy".getBytes(StandardCharsets.UTF_8));
    4950        }
    5051    }
  • trunk/test/unit/org/openstreetmap/josm/data/projection/ProjectionRefTest.java

    r9957 r10219  
    222222            Process process = pb.start();
    223223            OutputStream stdin = process.getOutputStream();
    224             final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin));
     224            final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stdin, StandardCharsets.UTF_8));
    225225            InputStream stdout = process.getInputStream();
    226             final BufferedReader reader = new BufferedReader(new InputStreamReader(stdout));
     226            final BufferedReader reader = new BufferedReader(new InputStreamReader(stdout, StandardCharsets.UTF_8));
    227227            String input = String.format("%.9f %.9f\n", ll.lon(), ll.lat());
    228228            writer.write(input);
  • trunk/test/unit/org/openstreetmap/josm/data/validation/routines/DomainValidatorTestIT.java

    r9869 r10219  
    2323import java.io.Closeable;
    2424import java.io.File;
     25import java.io.FileInputStream;
    2526import java.io.FileOutputStream;
    26 import java.io.FileReader;
    2727import java.io.IOException;
    2828import java.io.InputStream;
     29import java.io.InputStreamReader;
    2930import java.lang.reflect.Field;
    3031import java.lang.reflect.Modifier;
     
    3233import java.net.IDN;
    3334import java.net.URL;
     35import java.nio.charset.StandardCharsets;
    3436import java.text.SimpleDateFormat;
    3537import java.util.Date;
     
    8082        download(htmlFile, "http://www.iana.org/domains/root/db", timestamp);
    8183
    82         BufferedReader br = new BufferedReader(new FileReader(txtFile));
     84        BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(txtFile), StandardCharsets.UTF_8));
    8385        String line;
    8486        final String header;
     
    184186        final Pattern comment = Pattern.compile("\\s+<td>([^<]+)</td>");
    185187
    186         final BufferedReader br = new BufferedReader(new FileReader(f));
     188        final BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f), StandardCharsets.UTF_8));
    187189        String line;
    188190        while ((line = br.readLine()) != null) {
     
    288290            File rootCheck = new File(System.getProperty("java.io.tmpdir"), "tld_" + domain + ".html");
    289291            download(rootCheck, tldurl, 0L);
    290             in = new BufferedReader(new FileReader(rootCheck));
     292            in = new BufferedReader(new InputStreamReader(new FileInputStream(rootCheck), StandardCharsets.UTF_8));
    291293            String inputLine;
    292294            while ((inputLine = in.readLine()) != null) {
Note: See TracChangeset for help on using the changeset viewer.