@Test public void proxySelectorReturnsNull() throws Exception { ProxyDetectorImpl proxyDetector = new ProxyDetectorImpl( new Supplier<ProxySelector>() { @Override public ProxySelector get() { return null; } }, authenticator, null); assertNull(proxyDetector.proxyFor(destination)); }
@Nullable @Override public ProxyParameters proxyFor(SocketAddress targetServerAddress) throws IOException { if (override != null) { return override; } if (!(targetServerAddress instanceof InetSocketAddress)) { return null; } return detectProxy((InetSocketAddress) targetServerAddress); }
ProxyDetectorImpl implements ProxyDetector { @Nullable @Override public ProxyParameters proxyFor(SocketAddress targetServerAddress) throws IOException { if (override != null) { return override; } if (!(targetServerAddress instanceof InetSocketAddress)) { return null; } return detectProxy((InetSocketAddress) targetServerAddress); } }
ProxyDetectorImpl implements ProxyDetector { @Nullable @Override public ProxyParameters proxyFor(SocketAddress targetServerAddress) throws IOException { if (override != null) { return override; } if (!(targetServerAddress instanceof InetSocketAddress)) { return null; } return detectProxy((InetSocketAddress) targetServerAddress); } ProxyDetectorImpl(); @VisibleForTesting  ProxyDetectorImpl(
      Supplier<ProxySelector> proxySelector,
      AuthenticationProvider authenticationProvider,
      @Nullable String proxyEnvString); }
ProxyDetectorImpl implements ProxyDetector { @Nullable @Override public ProxyParameters proxyFor(SocketAddress targetServerAddress) throws IOException { if (override != null) { return override; } if (!(targetServerAddress instanceof InetSocketAddress)) { return null; } return detectProxy((InetSocketAddress) targetServerAddress); } ProxyDetectorImpl(); @VisibleForTesting  ProxyDetectorImpl(
      Supplier<ProxySelector> proxySelector,
      AuthenticationProvider authenticationProvider,
      @Nullable String proxyEnvString); @Nullable @Override ProxyParameters proxyFor(SocketAddress targetServerAddress); }
ProxyDetectorImpl implements ProxyDetector { @Nullable @Override public ProxyParameters proxyFor(SocketAddress targetServerAddress) throws IOException { if (override != null) { return override; } if (!(targetServerAddress instanceof InetSocketAddress)) { return null; } return detectProxy((InetSocketAddress) targetServerAddress); } ProxyDetectorImpl(); @VisibleForTesting  ProxyDetectorImpl(
      Supplier<ProxySelector> proxySelector,
      AuthenticationProvider authenticationProvider,
      @Nullable String proxyEnvString); @Nullable @Override ProxyParameters proxyFor(SocketAddress targetServerAddress);  }