Skip to content

Commit

Permalink
NO-SNOW Fix NPE if GZIP_DISABLED is not passed in by client
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-japatel committed Nov 13, 2023
1 parent b5ed386 commit 45186fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/net/snowflake/client/jdbc/SnowflakeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,11 @@ public static HttpClientSettingsKey convertProxyPropertiesToHttpClientKey(
String nonProxyHosts = info.getProperty(SFSessionProperty.NON_PROXY_HOSTS.getPropertyKey());
String proxyProtocol = info.getProperty(SFSessionProperty.PROXY_PROTOCOL.getPropertyKey());
Boolean gzipDisabled =
(info.getProperty(SFSessionProperty.GZIP_DISABLED.getPropertyKey()).isEmpty()
(!info.containsKey(SFSessionProperty.GZIP_DISABLED.getPropertyKey())
|| info.getProperty(SFSessionProperty.GZIP_DISABLED.getPropertyKey()).isEmpty())
? false
: Boolean.valueOf(
info.getProperty(SFSessionProperty.GZIP_DISABLED.getPropertyKey())));
info.getProperty(SFSessionProperty.GZIP_DISABLED.getPropertyKey()));
// Check for any user agent suffix
String userAgentSuffix = "";
if (info.containsKey(SFSessionProperty.USER_AGENT_SUFFIX)) {
Expand Down

0 comments on commit 45186fb

Please sign in to comment.