Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,10 @@ public static IOException enhance(
final IOException ex = createConnectTimeoutException(cause, namedEndpoint, remoteAddresses);
ex.initCause(cause);
return ex;
} else {
final IOException ex = createHttpHostConnectException(cause, namedEndpoint, remoteAddresses);
ex.setStackTrace(cause.getStackTrace());
return ex;
}
final IOException ex = createHttpHostConnectException(cause, namedEndpoint, remoteAddresses);
ex.setStackTrace(cause.getStackTrace());
return ex;
} else {
return cause;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,8 @@ public final HttpHost getHopTarget(final int hop) {
Args.check(hop < hopcount, "Hop index exceeds tracked route length");
if (hop < hopcount - 1) {
return this.proxyChain.get(hop);
} else {
return this.targetHost;
}
return this.targetHost;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ public DecompressingEntity(
}

private InputStream getDecompressingStream() throws IOException {
final InputStream in = super.getContent();
return new LazyDecompressingInputStream(in, inputStreamFactory);
return new LazyDecompressingInputStream(super.getContent(), inputStreamFactory);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public String getName() {
return this.name;
}

@Override
public void addField(final String name, final String value) {
Args.notNull(name, "Field name");
super.addField(name, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,8 @@ public final HttpRoute determineRoute(final HttpHost host, final HttpContext con
final boolean secure = target.getSchemeName().equalsIgnoreCase("https");
if (proxy == null) {
return new HttpRoute(target, determineLocalAddress(target, context), secure);
} else {
return new HttpRoute(target, determineLocalAddress(proxy, context), proxy, secure);
}
return new HttpRoute(target, determineLocalAddress(proxy, context), proxy, secure);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,8 @@ private static boolean hasEntry(final Map<String, DomainType> map, final String
final DomainType domainType = map.get(rule);
if (domainType == null) {
return false;
} else {
return expectedType == null || domainType.equals(expectedType);
}
return expectedType == null || domainType.equals(expectedType);
}

private boolean hasRule(final String rule, final DomainType expectedType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,17 @@ public static HttpHost determineHost(final HttpRequest request) throws HttpExcep
throw new ProtocolException("Protocol scheme is not specified");
}
return new HttpHost(scheme, authority);
} else {
try {
final URI requestURI = request.getUri();
if (requestURI.isAbsolute()) {
final HttpHost httpHost = URIUtils.extractHost(requestURI);
if (httpHost == null) {
throw new ProtocolException("URI does not specify a valid host name: " + requestURI);
}
return httpHost;
}
try {
final URI requestURI = request.getUri();
if (requestURI.isAbsolute()) {
final HttpHost httpHost = URIUtils.extractHost(requestURI);
if (httpHost == null) {
throw new ProtocolException("URI does not specify a valid host name: " + requestURI);
}
} catch (final URISyntaxException ignore) {
return httpHost;
}
} catch (final URISyntaxException ignore) {
}
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ void applyParameters(final SSLEngine sslEngine, final SSLParameters sslParameter
TlsDetails createTlsDetails(final SSLEngine sslEngine) {
if (Conscrypt.isConscrypt(sslEngine)) {
return new TlsDetails(sslEngine.getSession(), Conscrypt.getApplicationProtocol(sslEngine));
} else {
return null;
}
return null;
}

public static boolean isSupported() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ void verifySession(
final ProtocolVersion tls = TLS.parse(sslsession.getProtocol());
if (tls.greaterEquals(TLS.V_1_3.version)) {
return;
} else {
throw ex;
}
throw ex;
} catch (final ParseException ex2) {
throw ex;
}
Expand Down