Bug 564923 - Do not display proxy warning on macOS

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>
1 file changed