Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2020-07-04 09:03:06 -0400
committerAlex Blewitt2020-07-15 04:27:52 -0400
commit7f7dbae6777773c1b54c3c9864728b4215e19219 (patch)
tree43c2543c100648d7dc91e7c44e02952402925bf7
parent494ada4f81a713f73c0b3e5dd2d71e572af6e21a (diff)
downloadeclipse.platform.team-I20200721-0610.tar.gz
eclipse.platform.team-I20200721-0610.tar.xz
eclipse.platform.team-I20200721-0610.zip
When running on macOS, a warning is shown on the console every time an Eclipse application is launched: > !ENTRY org.eclipse.core.net 1 0 2020-07-04 14:01:49.811 > !MESSAGE System property http.nonProxyHosts has been set to > local|*.local|169.254/16|*.169.254/16 by an external source. > This value will be overwritten using the values from the preferences This warning is unnecessary, because the JVM automatically sets these values on startup and the proxy setup then does exactly the same thing. There appears to be a logic bug in that the path to verify that the proxies are set that assumes the nonProxyHosts property is empty if the proxies are disabled. However, that condition on macOS is not valid, since the JVM itself will set this value even if the proxies aren't set. Therefore, checking the field is empty on macOS isn't valid. https://github.com/openjdk/jdk/blob/f37d9c8abca50b65ed232831a06d60c1d015013f/src/java.base/macosx/native/libjava/java_props_macosx.c#L449 For minimal impact, when running on macOS, pass the DO_NOT_VERIFY instead of VERIFY_EMPTY so that this message is not generated unnecessarily every time Eclipse launches. Change-Id: I68e955677b347a6b62ef83cdb842c3aa15b203d8 Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
index d4e5c6d63..955bfb1e7 100644
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
+++ b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/ProxyType.java
@@ -533,7 +533,10 @@ public class ProxyType implements INodeChangeListener, IPreferenceChangeListener
}
public void initialize() {
- updateSystemProperties(getProxyData(VERIFY_EMPTY));
+ // On mac, the system proxy configuration is set by the JVM automatically
+ boolean isMac = "macosx".equals(System.getProperty("osgi.os")); //$NON-NLS-1$//$NON-NLS-2$
+ int verify = isMac ? DO_NOT_VERIFY : VERIFY_EMPTY;
+ updateSystemProperties(getProxyData(verify));
preferenceManager.addNodeChangeListener(PREF_PROXY_DATA_NODE, this);
preferenceManager.addPreferenceChangeListener(getPreferenceNode(), this);
}

Back to the top