Changeset 9175 in josm for trunk/src/org


Ignore:
Timestamp:
2015-12-27T00:12:51+01:00 (4 years ago)
Author:
simon04
Message:

see #12231 - Use HttpClient instead of remaining Utils.setupURLConnection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/widgets/JosmEditorPane.java

    r8846 r9175  
    77import java.io.InputStream;
    88import java.net.URL;
    9 import java.net.URLConnection;
    109import java.text.MessageFormat;
    1110
     
    1716
    1817import org.openstreetmap.josm.gui.util.GuiHelper;
     18import org.openstreetmap.josm.tools.HttpClient;
    1919import org.openstreetmap.josm.tools.LanguageInfo;
    20 import org.openstreetmap.josm.tools.Utils;
    2120
    2221/**
     
    7675    @Override
    7776    protected InputStream getStream(URL page) throws IOException {
    78         URLConnection conn = Utils.setupURLConnection(page.openConnection());
    79         InputStream result = conn.getInputStream();
     77        final HttpClient.Response conn = HttpClient.create(page).connect();
    8078        String type = conn.getContentType();
    8179        if (type != null) {
    8280            setContentType(type);
    8381        }
    84         return result;
     82        return conn.getContent();
    8583    }
    8684
Note: See TracChangeset for help on using the changeset viewer.