anuragmantri commented on code in PR #15506:
URL: https://github.com/apache/iceberg/pull/15506#discussion_r3076117355


##########
aws/src/main/java/org/apache/iceberg/aws/UrlConnectionHttpClientConfigurations.java:
##########
@@ -69,9 +77,26 @@ void configureUrlConnectionHttpClientBuilder(
       urlConnectionHttpClientBuilder.socketTimeout(
           Duration.ofMillis(httpClientUrlConnectionSocketTimeoutMs));
     }
-    if (proxyEndpoint != null) {
-      urlConnectionHttpClientBuilder.proxyConfiguration(
-          
ProxyConfiguration.builder().endpoint(URI.create(proxyEndpoint)).build());
+    configureProxy(urlConnectionHttpClientBuilder);
+  }
+
+  private void configureProxy(UrlConnectionHttpClient.Builder 
urlConnectionHttpClientBuilder) {
+    if (proxyEndpoint != null
+        || proxyUseSystemPropertyValues != null
+        || proxyUseEnvironmentVariableValues != null) {
+      ProxyConfiguration.Builder proxyBuilder = ProxyConfiguration.builder();
+
+      if (proxyEndpoint != null) {
+        proxyBuilder.endpoint(URI.create(proxyEndpoint));
+      }
+      if (proxyUseSystemPropertyValues != null) {
+        proxyBuilder.useSystemPropertyValues(proxyUseSystemPropertyValues);
+      }
+      if (proxyUseEnvironmentVariableValues != null) {
+        
proxyBuilder.useEnvironmentVariablesValues(proxyUseEnvironmentVariableValues);

Review Comment:
   Just a nit. I see that `UrlConnectionHttpClient.Builder` has 
`proxyBuilder.useEnvironmentVariablesValues()` with plural for variables. To be 
consistent, can we use the same for the local variable?
   
    `proxyUseEnvironmentVariableValues` -> `proxyUseEnvironmentVariablesValues`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to