Ignore:
Timestamp:
2012-11-18T00:44:10+01:00 (13 years ago)
Author:
Don-vip
Message:

Single entry point in Utils to open HTTP connections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/help/HelpContentReader.java

    r5266 r5587  
    99import java.net.URL;
    1010
     11import org.openstreetmap.josm.tools.Utils;
    1112import org.openstreetmap.josm.tools.WikiReader;
    1213
     
    4647     */
    4748    public String fetchHelpTopicContent(String helpTopicUrl, boolean dotest) throws HelpContentReaderException {
    48         URL url = null;
    4949        HttpURLConnection con = null;
    5050        BufferedReader in = null;
    5151        try {
    52             url = new URL(helpTopicUrl);
    53             con = (HttpURLConnection)url.openConnection();
     52            con = Utils.openHttpConnection(new URL(helpTopicUrl));
    5453            con.connect();
    5554            in = new BufferedReader(new InputStreamReader(con.getInputStream(),"utf-8"));
Note: See TracChangeset for help on using the changeset viewer.