Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-astachowski committed Sep 6, 2024
1 parent 20242c6 commit 0e8de1a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/main/java/net/snowflake/client/core/HttpUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,17 @@ public static void setSessionlessProxyForAzure(
*/
public static void setProxyForAzure(HttpClientSettingsKey key, OperationContext opContext) {
if (key != null && key.usesProxy()) {
Proxy azProxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(key.getProxyHost(), key.getProxyPort()));
Proxy azProxy =
new Proxy(Proxy.Type.HTTP, new InetSocketAddress(key.getProxyHost(), key.getProxyPort()));
opContext.setProxy(azProxy);
boolean setProxyUser = !Strings.isNullOrEmpty(key.getProxyUser()) && !Strings.isNullOrEmpty(key.getProxyPassword());
logger.debug("Setting Azure proxy {} user. Host: {}, port: {}",
setProxyUser ? "with" : "without",
key.getProxyHost(),
key.getProxyPort());
boolean setProxyUser =
!Strings.isNullOrEmpty(key.getProxyUser())
&& !Strings.isNullOrEmpty(key.getProxyPassword());
logger.debug(
"Setting Azure proxy {} user. Host: {}, port: {}",
setProxyUser ? "with" : "without",
key.getProxyHost(),
key.getProxyPort());
if (setProxyUser) {
opContext.setProxyUsername(key.getProxyUser());
opContext.setProxyPassword(key.getProxyPassword());
Expand Down

0 comments on commit 0e8de1a

Please sign in to comment.