Skip to content

Commit 714aa97

Browse files
committed
Fix formatting
1 parent 6ca47f7 commit 714aa97

3 files changed

Lines changed: 5 additions & 14 deletions

File tree

httpclient5/src/main/java/org/apache/hc/client5/http/Rfc6724AddressSelectingDnsResolver.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import java.util.Arrays;
3939
import java.util.Collections;
4040
import java.util.Comparator;
41-
import java.util.LinkedList;
4241
import java.util.List;
4342

4443
import org.apache.hc.client5.http.config.ProtocolFamilyPreference;
@@ -236,7 +235,7 @@ private static List<InetAddress> applyFamilyPreference(
236235
final List<InetAddress> second = new ArrayList<>();
237236
for (final InetAddress a : rfcSorted) {
238237
final boolean isV6 = a instanceof Inet6Address;
239-
if ((preferV6 && isV6) || (!preferV6 && !isV6)) {
238+
if (preferV6 && isV6 || !preferV6 && !isV6) {
240239
first.add(a);
241240
} else {
242241
second.add(a);

httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/MultihomeIOSessionRequester.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ private void runStaggered(
321321
? this.connectionConfig.getProtocolFamilyPreference()
322322
: ProtocolFamilyPreference.INTERLEAVE;
323323

324-
if ((pref == ProtocolFamilyPreference.IPV6_ONLY && v6.isEmpty())
325-
|| (pref == ProtocolFamilyPreference.IPV4_ONLY && v4.isEmpty())) {
324+
if (pref == ProtocolFamilyPreference.IPV6_ONLY && v6.isEmpty()
325+
|| pref == ProtocolFamilyPreference.IPV4_ONLY && v4.isEmpty()) {
326326
if (LOG.isDebugEnabled()) {
327327
LOG.debug("{} no addresses for {}", remoteEndpoint.getHostName(), pref);
328328
}

httpclient5/src/main/java/org/apache/hc/client5/http/impl/nio/PoolingAsyncClientConnectionManagerBuilder.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -306,17 +306,9 @@ public PoolingAsyncClientConnectionManager build() {
306306
tlsStrategyCopy = tlsStrategy;
307307
} else {
308308
if (ReflectionUtils.determineJRELevel() <= 8 && ConscryptClientTlsStrategy.isSupported()) {
309-
if (systemProperties) {
310-
tlsStrategyCopy = ConscryptClientTlsStrategy.getSystemDefault();
311-
} else {
312-
tlsStrategyCopy = ConscryptClientTlsStrategy.getDefault();
313-
}
309+
tlsStrategyCopy = ConscryptClientTlsStrategy.getDefault();
314310
} else {
315-
if (systemProperties) {
316-
tlsStrategyCopy = DefaultClientTlsStrategy.createSystemDefault();
317-
} else {
318-
tlsStrategyCopy = DefaultClientTlsStrategy.createDefault();
319-
}
311+
tlsStrategyCopy = DefaultClientTlsStrategy.createDefault();
320312
}
321313
}
322314
final PoolingAsyncClientConnectionManager poolingmgr = new PoolingAsyncClientConnectionManager(

0 commit comments

Comments
 (0)