Changeset 12620 in josm for trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
- Timestamp:
- 2017-08-22T22:26:32+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/DefaultProxySelector.java
r12537 r12620 21 21 import org.openstreetmap.josm.gui.preferences.server.ProxyPreferencesPanel; 22 22 import org.openstreetmap.josm.gui.preferences.server.ProxyPreferencesPanel.ProxyPolicy; 23 import org.openstreetmap.josm.tools.Logging; 23 24 24 25 /** … … 93 94 port = Integer.parseInt(value); 94 95 } catch (NumberFormatException e) { 95 Main.error(tr("Unexpected format for port number in preference ''{0}''. Got ''{1}''.", property, value));96 Main.error(tr("The proxy will not be used."));96 Logging.error(tr("Unexpected format for port number in preference ''{0}''. Got ''{1}''.", property, value)); 97 Logging.error(tr("The proxy will not be used.")); 97 98 return 0; 98 99 } 99 100 if (port <= 0 || port > 65_535) { 100 Main.error(tr("Illegal port number in preference ''{0}''. Got {1}.", property, port));101 Main.error(tr("The proxy will not be used."));101 Logging.error(tr("Illegal port number in preference ''{0}''. Got {1}.", property, port)); 102 Logging.error(tr("The proxy will not be used.")); 102 103 return 0; 103 104 } … … 116 117 proxyPolicy = ProxyPolicy.fromName(value); 117 118 if (proxyPolicy == null) { 118 Main.warn(tr("Unexpected value for preference ''{0}'' found. Got ''{1}''. Will use no proxy.",119 Logging.warn(tr("Unexpected value for preference ''{0}'' found. Got ''{1}''. Will use no proxy.", 119 120 ProxyPreferencesPanel.PROXY_POLICY, value)); 120 121 proxyPolicy = ProxyPolicy.NO_PROXY; … … 128 129 httpProxySocketAddress = new InetSocketAddress(host, port); 129 130 } else { 130 Main.warn(tr("Unexpected parameters for HTTP proxy. Got host ''{0}'' and port ''{1}''.", host, port));131 Main.warn(tr("The proxy will not be used."));131 Logging.warn(tr("Unexpected parameters for HTTP proxy. Got host ''{0}'' and port ''{1}''.", host, port)); 132 Logging.warn(tr("The proxy will not be used.")); 132 133 } 133 134 } … … 140 141 socksProxySocketAddress = new InetSocketAddress(host, port); 141 142 } else { 142 Main.warn(tr("Unexpected parameters for SOCKS proxy. Got host ''{0}'' and port ''{1}''.", host, port));143 Main.warn(tr("The proxy will not be used."));143 Logging.warn(tr("Unexpected parameters for SOCKS proxy. Got host ''{0}'' and port ''{1}''.", host, port)); 144 Logging.warn(tr("The proxy will not be used.")); 144 145 } 145 146 } … … 153 154 public void connectFailed(URI uri, SocketAddress sa, IOException ioe) { 154 155 // Just log something. The network stack will also throw an exception which will be caught somewhere else 155 Main.error(tr("Connection to proxy ''{0}'' for URI ''{1}'' failed. Exception was: {2}", sa.toString(), uri.toString(), ioe.toString())); 156 Logging.error(tr("Connection to proxy ''{0}'' for URI ''{1}'' failed. Exception was: {2}", 157 sa.toString(), uri.toString(), ioe.toString())); 156 158 // Remember errors to give a friendly user message asking to review proxy configuration 157 159 errorResources.add(uri.toString()); … … 203 205 case USE_SYSTEM_SETTINGS: 204 206 if (!jvmWillUseSystemProxies) { 205 Main.warn(tr("The JVM is not configured to lookup proxies from the system settings. "+207 Logging.warn(tr("The JVM is not configured to lookup proxies from the system settings. "+ 206 208 "The property ''java.net.useSystemProxies'' was missing at startup time. Will not use a proxy.")); 207 209 return NO_PROXY_LIST;
Note:
See TracChangeset
for help on using the changeset viewer.