public void deactivateAll() {
        for (String scheme : new String[] {"http", "https"}) {
            InetSocketAddress originalProxy = originalProxies.remove(scheme);
            if (originalProxy != null) {
                System.setProperty(scheme + ".proxyHost", originalProxy.getHostName());
                System.setProperty(scheme + ".proxyPort", Integer.toString(originalProxy.getPort()));
            } else {
                System.clearProperty(scheme + ".proxyHost");
                System.clearProperty(scheme + ".proxyPort");
            }
        }

        if (originalNonProxyHosts.isEmpty()) {
            System.clearProperty("http.nonProxyHosts");
        } else {
            System.setProperty("http.nonProxyHosts", Joiner.on('|').join(originalNonProxyHosts));
        }
        originalNonProxyHosts.clear();
    }
public void deactivateAll ( ) { for ( String scheme : new String [ ] { "http" , "https" } ) { InetSocketAddress originalProxy = originalProxies . remove ( scheme ) ; if ( originalProxy != null ) { System . setProperty ( scheme + ".proxyHost" , originalProxy . getHostName ( ) ) ; System . setProperty ( scheme + ".proxyPort" , Integer . toString ( originalProxy . getPort ( ) ) ) ; } else { System . clearProperty ( scheme + ".proxyHost" ) ; System . clearProperty ( scheme + ".proxyPort" ) ; } } if ( originalNonProxyHosts . isEmpty ( ) ) { System . clearProperty ( "http.nonProxyHosts" ) ; } else { System . setProperty ( "http.nonProxyHosts" , Joiner . on ( '|' ) . join ( originalNonProxyHosts ) ) ; } originalNonProxyHosts . clear ( ) ; }
Deactivates all proxy overrides restoring the pre-existing proxy settings if any.