Skip to content

Commit 1de12aa

Browse files
committed
address pr review
1 parent cf3dcd6 commit 1de12aa

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

java-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryJdbcProxyUtility.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ static HttpTransportOptions getHttpTransportOptions(
144144
getHttpTransportFactory(
145145
proxyProperties, sslTrustStorePath, sslTrustStorePassword, callerClassName));
146146
} else {
147-
httpTransportOptionsBuilder.setHttpTransportFactory(
148-
() -> new NetHttpTransport.Builder().build());
147+
final HttpTransport defaultTransport = new NetHttpTransport.Builder().build();
148+
httpTransportOptionsBuilder.setHttpTransportFactory(() -> defaultTransport);
149149
}
150150

151151
if (connectTimeout != null) {
@@ -177,9 +177,8 @@ private static HttpTransportFactory getHttpTransportFactory(
177177
HttpRoutePlanner httpRoutePlanner = new DefaultProxyRoutePlanner(proxyHostDetails);
178178
httpClientBuilder.setRoutePlanner(httpRoutePlanner);
179179
addAuthToProxyIfPresent(proxyProperties, httpClientBuilder, callerClassName);
180-
} else {
181-
httpClientBuilder.useSystemProperties();
182180
}
181+
httpClientBuilder.useSystemProperties();
183182

184183
if (sslTrustStorePath != null) {
185184
try (FileInputStream trustStoreStream = new FileInputStream(sslTrustStorePath)) {

0 commit comments

Comments
 (0)