Ignore:
Timestamp:
2017-09-13T23:24:50+02:00 (7 years ago)
Author:
bastiK
Message:

see #15229 - use Config.getPref() wherever possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java

    r12841 r12846  
    1818import java.util.TreeSet;
    1919
    20 import org.openstreetmap.josm.Main;
     20import org.openstreetmap.josm.spi.preferences.Config;
    2121import org.openstreetmap.josm.tools.Logging;
    2222
     
    126126     */
    127127    public final void initFromPreferences() {
    128         String value = Main.pref.get(PROXY_POLICY);
     128        String value = Config.getPref().get(PROXY_POLICY);
    129129        if (value.isEmpty()) {
    130130            proxyPolicy = ProxyPolicy.NO_PROXY;
     
    137137            }
    138138        }
    139         String host = Main.pref.get(PROXY_HTTP_HOST, null);
    140         int port = parseProxyPortValue(PROXY_HTTP_PORT, Main.pref.get(PROXY_HTTP_PORT, null));
     139        String host = Config.getPref().get(PROXY_HTTP_HOST, null);
     140        int port = parseProxyPortValue(PROXY_HTTP_PORT, Config.getPref().get(PROXY_HTTP_PORT, null));
    141141        httpProxySocketAddress = null;
    142142        if (proxyPolicy.equals(ProxyPolicy.USE_HTTP_PROXY)) {
     
    149149        }
    150150
    151         host = Main.pref.get(PROXY_SOCKS_HOST, null);
    152         port = parseProxyPortValue(PROXY_SOCKS_PORT, Main.pref.get(PROXY_SOCKS_PORT, null));
     151        host = Config.getPref().get(PROXY_SOCKS_HOST, null);
     152        port = parseProxyPortValue(PROXY_SOCKS_PORT, Config.getPref().get(PROXY_SOCKS_PORT, null));
    153153        socksProxySocketAddress = null;
    154154        if (proxyPolicy.equals(ProxyPolicy.USE_SOCKS_PROXY)) {
     
    161161        }
    162162        proxyExceptions = new HashSet<>(
    163             Main.pref.getList(PROXY_EXCEPTIONS,
     163            Config.getPref().getList(PROXY_EXCEPTIONS,
    164164                    Arrays.asList("localhost", IPV4_LOOPBACK, IPV6_LOOPBACK))
    165165        );
Note: See TracChangeset for help on using the changeset viewer.