Wildcards work if you set the system property "http.nonProxyHosts" but not if you set "java.net.useSystemProxies". System proxy is evaluated in http://hg.openjdk.java.net/jdk/jdk/file/4547f8303f2d/src/java.base/windows/native/libnet/DefaultProxySelector.c, line 272 and this is a simple compare, no wildcards.
Gerd Müller-Schramm Software Developer, GeoMedia Smart Client Kommunal T: +49 341 92 60 30 47 E: gerd.mueller-schr...@hexagon.com HxGN Safty & Infrastructure GmbH Wittenberger Straße 15B 04129 Leipzig, Germany hexagon.com HxGN SI is part of HEXAGON -----Original Message----- From: Chris Hegarty <chris.hega...@oracle.com> Sent: Donnerstag, 8. November 2018 13:19 To: MUELLER-SCHRAMM Gerd <gerd.mueller-schr...@hexagon.com>; net-dev@openjdk.java.net Subject: Re: JDK-7014531 Gerd, On 07/11/18 15:24, MUELLER-SCHRAMM Gerd wrote: > Hi, > > I’ve got a question regarding JDK-7014531 > <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbu > gs.openjdk.java.net%2Fbrowse%2FJDK-7014531&data=02%7C01%7C%7C007c5 > 559df4f4337516c08d645745079%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C636772763199634859&sdata=O%2B0Rk6oZX0bIsV2PVI7HANChd8HGr0W7%2FhoBjN8yMgA%3D&reserved=0>. > This bug is still open and after checking it against Java 11 still valid. > Will it ever be fixed? > > I’ve took a look at the source code and the bug seems to be in > DefaultProxySelector.c, > Java_sun_net_spi_DefaultProxySelector_getSystemProxies. > > This method doesn’t care about wildcards but only compares the host names. There is certainly some support for wildcards in nonProxyHosts. There are a few proxy selector tests that verify that ( [1] seems to be the most comprehensive ). The fix for 8170868 [2], provides better integrates with the system proxy configuration. I've added a comment to 7014531. Maybe there is still an issue but it is not clear from 7014531 what that might be. -Chris [1] https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fhg.openjdk.java.net%2Fjdk%2Fjdk%2Ffile%2Ftip%2Ftest%2Fjdk%2Fjava%2Fnet%2FProxySelector%2FB8035158.java&data=02%7C01%7C%7C007c5559df4f4337516c08d645745079%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C636772763199634859&sdata=RCq77tWCI8uUQhJ4Lm1dC1P08XIdeDuroTpnWIyUQCk%3D&reserved=0 [1] https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugs.openjdk.java.net%2Fbrowse%2FJDK-8170868&data=02%7C01%7C%7C007c5559df4f4337516c08d645745079%7C1b16ab3eb8f64fe39f3e2db7fe549f6a%7C0%7C0%7C636772763199634859&sdata=zetPGr4cD00fNIBYhUz69yB6uPje8lwralI6ekG4crY%3D&reserved=0