Ignore:
Timestamp:
2015-12-26T23:41:52+01:00 (5 years ago)
Author:
simon04
Message:

see #12231 - Uniform access to HTTP resources

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
1 added
1 edited

Legend:

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

    r8933 r9168  
    5353    public String read(String url) throws IOException {
    5454        URL u = new URL(url);
    55         try (BufferedReader in = Utils.openURLReader(u)) {
     55        try (BufferedReader in = HttpClient.create(u).connect().getContentReader()) {
    5656            boolean txt = url.endsWith("?format=txt");
    5757            if (url.startsWith(getBaseUrlWiki()) && !txt)
     
    9898
    9999    private String readLang(URL url) throws IOException {
    100         try (BufferedReader in = Utils.openURLReader(url)) {
     100        try (BufferedReader in = HttpClient.create(url).connect().getContentReader()) {
    101101            return readFromTrac(in, url);
    102         } catch (IOException e) {
    103             Main.addNetworkError(url, Utils.getRootCause(e));
    104             throw e;
    105102        }
    106103    }
Note: See TracChangeset for help on using the changeset viewer.