Skip to content

Commit 70f3ca2

Browse files
Merge branch 'master' into SNOW-1902245-wif-gcp
2 parents f9114b1 + 3ec16d3 commit 70f3ca2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+178
-214
lines changed

.github/workflows/jira_issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
summary: '${{ github.event.issue.title }}'
3838
description: |
3939
${{ github.event.issue.body }} \\ \\ _Created from GitHub Action_ for ${{ github.event.issue.html_url }}
40-
fields: '{ "customfield_11401": {"id": "14723"}, "assignee": {"id": "712020:e1f41916-da57-4fe8-b317-116d5229aa51"}, "components":[{"id":"19281"}], "labels": ["oss"], "priority": {"id": "10001"} }'
40+
fields: '{ "customfield_11401": {"id": "14723"}, "assignee": {"id": "712020:e527ae71-55cc-4e02-9217-1ca4ca8028a2"}, "components":[{"id":"19281"}], "labels": ["oss"], "priority": {"id": "10001"} }'
4141

4242
- name: Update GitHub Issue
4343
uses: ./jira/gajira-issue-update

CHANGELOG.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
**JDBC Driver 3.23.2**
2+
3+
- \||Please Refer to Release Notes at https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc
4+
15
**JDBC Driver 3.23.1**
26

37
- \||Please Refer to Release Notes at https://docs.snowflake.com/en/release-notes/clients-drivers/jdbc

FIPS/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
<parent>
66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.23.2-SNAPSHOT</version>
8+
<version>3.23.2</version>
99
<relativePath>../parent-pom.xml</relativePath>
1010
</parent>
1111

1212
<artifactId>snowflake-jdbc-fips</artifactId>
13-
<version>3.23.2-SNAPSHOT</version>
13+
<version>3.23.2</version>
1414
<packaging>jar</packaging>
1515

1616
<name>snowflake-jdbc-fips</name>

parent-pom.xml

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>net.snowflake</groupId>
77
<artifactId>snowflake-jdbc-parent</artifactId>
8-
<version>3.23.2-SNAPSHOT</version>
8+
<version>3.23.2</version>
99
<packaging>pom</packaging>
1010

1111
<modules>
@@ -48,7 +48,6 @@
4848
<google.flatbuffers.version>24.3.25</google.flatbuffers.version>
4949
<google.gax.version>2.57.0</google.gax.version>
5050
<google.guava.version>33.3.1-jre</google.guava.version>
51-
<google.http.client.version>1.45.0</google.http.client.version>
5251
<google.j2objc-annotations.version>3.0.0</google.j2objc-annotations.version>
5352
<google.jsr305.version>3.0.2</google.jsr305.version>
5453
<google.protobuf.java.version>4.28.2</google.protobuf.java.version>
@@ -59,7 +58,6 @@
5958
<jacoco.skip.instrument>true</jacoco.skip.instrument>
6059
<javax.servlet.version>3.1.0</javax.servlet.version>
6160
<jna.version>5.13.0</jna.version>
62-
<joda.time.version>2.8.1</joda.time.version>
6361
<json.smart.version>2.5.2</json.smart.version>
6462
<junit4.version>4.13.2</junit4.version>
6563
<junit.version>5.11.1</junit.version>
@@ -127,13 +125,6 @@
127125
<type>pom</type>
128126
<scope>import</scope>
129127
</dependency>
130-
<dependency>
131-
<groupId>com.google.http-client</groupId>
132-
<artifactId>google-http-client-bom</artifactId>
133-
<version>${google.http.client.version}</version>
134-
<type>pom</type>
135-
<scope>import</scope>
136-
</dependency>
137128
<dependency>
138129
<groupId>com.google.protobuf</groupId>
139130
<artifactId>protobuf-bom</artifactId>
@@ -368,11 +359,6 @@
368359
<artifactId>javax.servlet-api</artifactId>
369360
<version>${javax.servlet.version}</version>
370361
</dependency>
371-
<dependency>
372-
<groupId>joda-time</groupId>
373-
<artifactId>joda-time</artifactId>
374-
<version>${joda.time.version}</version>
375-
</dependency>
376362
<dependency>
377363
<groupId>net.minidev</groupId>
378364
<artifactId>json-smart</artifactId>
@@ -655,10 +641,6 @@
655641
<groupId>com.google.guava</groupId>
656642
<artifactId>guava</artifactId>
657643
</dependency>
658-
<dependency>
659-
<groupId>com.google.http-client</groupId>
660-
<artifactId>google-http-client</artifactId>
661-
</dependency>
662644
<dependency>
663645
<groupId>com.microsoft.azure</groupId>
664646
<artifactId>azure-storage</artifactId>
@@ -695,10 +677,6 @@
695677
<groupId>javax.servlet</groupId>
696678
<artifactId>javax.servlet-api</artifactId>
697679
</dependency>
698-
<dependency>
699-
<groupId>joda-time</groupId>
700-
<artifactId>joda-time</artifactId>
701-
</dependency>
702680
<dependency>
703681
<groupId>net.minidev</groupId>
704682
<artifactId>json-smart</artifactId>

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<parent>
77
<groupId>net.snowflake</groupId>
88
<artifactId>snowflake-jdbc-parent</artifactId>
9-
<version>3.23.2-SNAPSHOT</version>
9+
<version>3.23.2</version>
1010
<relativePath>./parent-pom.xml</relativePath>
1111
</parent>
1212

1313
<!-- Maven complains about using property here, but it makes install and deploy process easier to override final package names and localization -->
1414
<artifactId>${artifactId}</artifactId>
15-
<version>3.23.2-SNAPSHOT</version>
15+
<version>3.23.2</version>
1616
<packaging>jar</packaging>
1717

1818
<name>${artifactId}</name>

src/main/java/net/snowflake/client/config/SFConnectionConfigParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
package net.snowflake.client.config;
22

33
import static net.snowflake.client.jdbc.SnowflakeUtil.convertSystemGetEnvToBooleanValue;
4+
import static net.snowflake.client.jdbc.SnowflakeUtil.isNullOrEmpty;
45
import static net.snowflake.client.jdbc.SnowflakeUtil.isWindows;
56
import static net.snowflake.client.jdbc.SnowflakeUtil.systemGetEnv;
67

78
import com.fasterxml.jackson.dataformat.toml.TomlMapper;
8-
import com.google.common.base.Strings;
99
import java.io.File;
1010
import java.io.IOException;
1111
import java.nio.charset.Charset;
@@ -162,7 +162,7 @@ private static String createUrl(Map<String, String> fileConnectionConfiguration)
162162
logger.debug("Host created using parameters from connection configuration file: {}", host);
163163
String port = fileConnectionConfiguration.get("port");
164164
String protocol = fileConnectionConfiguration.get("protocol");
165-
if (Strings.isNullOrEmpty(port)) {
165+
if (isNullOrEmpty(port)) {
166166
if ("https".equals(protocol)) {
167167
port = "443";
168168
} else {

src/main/java/net/snowflake/client/core/CredentialManager.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package net.snowflake.client.core;
22

3-
import com.amazonaws.util.StringUtils;
4-
import com.google.common.base.Strings;
3+
import static net.snowflake.client.jdbc.SnowflakeUtil.isNullOrEmpty;
4+
55
import java.net.URI;
66
import java.nio.charset.StandardCharsets;
77
import java.util.Base64;
@@ -149,7 +149,7 @@ static void fillCachedDPoPBundledAccessToken(SFLoginInput loginInput) throws SFE
149149
synchronized void fillCachedCredential(
150150
SFLoginInput loginInput, String host, String username, CachedCredentialType credType)
151151
throws SFException {
152-
if (StringUtils.isNullOrEmpty(username)) {
152+
if (isNullOrEmpty(username)) {
153153
logger.debug("Missing username; Cannot read from credential cache");
154154
return;
155155
}
@@ -210,7 +210,7 @@ synchronized void fillCachedCredential(
210210

211211
private void updateInputWithTokenAndPublicKey(String cred, SFLoginInput loginInput)
212212
throws SFException {
213-
if (Strings.isNullOrEmpty(cred)) {
213+
if (isNullOrEmpty(cred)) {
214214
String[] values = cred.split("\\.");
215215
if (values.length != 2) {
216216
throw new SFException(
@@ -313,11 +313,11 @@ static void writeDPoPBundledAccessToken(SFLoginInput loginInput) throws SFExcept
313313
/** Store the temporary credential */
314314
synchronized void writeTemporaryCredential(
315315
String host, String user, String cred, CachedCredentialType credType) {
316-
if (StringUtils.isNullOrEmpty(user)) {
316+
if (isNullOrEmpty(user)) {
317317
logger.debug("Missing username; Cannot write to credential cache");
318318
return;
319319
}
320-
if (Strings.isNullOrEmpty(cred)) {
320+
if (isNullOrEmpty(cred)) {
321321
logger.debug("No {} is given.", credType);
322322
return; // no credential
323323
}
@@ -426,7 +426,7 @@ synchronized void deleteTemporaryCredential(
426426
logMissingJnaJarForSecureLocalStorage();
427427
return;
428428
}
429-
if (StringUtils.isNullOrEmpty(user)) {
429+
if (isNullOrEmpty(user)) {
430430
logger.debug("Missing username; Cannot delete from credential cache");
431431
return;
432432
}

src/main/java/net/snowflake/client/core/EventHandler.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,18 @@
1212
import java.util.ArrayList;
1313
import java.util.Comparator;
1414
import java.util.Date;
15-
import java.util.HashMap;
16-
import java.util.Map;
1715
import java.util.TimeZone;
1816
import java.util.TreeSet;
1917
import java.util.concurrent.Executors;
2018
import java.util.concurrent.ScheduledExecutorService;
2119
import java.util.concurrent.ThreadFactory;
2220
import java.util.concurrent.TimeUnit;
23-
import java.util.concurrent.atomic.AtomicInteger;
2421
import java.util.logging.Formatter;
2522
import java.util.logging.Handler;
2623
import java.util.logging.LogRecord;
2724
import java.util.zip.GZIPOutputStream;
2825
import net.snowflake.client.log.SFLogger;
2926
import net.snowflake.client.log.SFLoggerFactory;
30-
import org.joda.time.DateTime;
3127

3228
public class EventHandler extends Handler {
3329
private static final SFLogger logger = SFLoggerFactory.getLogger(EventHandler.class);
@@ -94,12 +90,6 @@ public void run() {
9490
// Period of time (in ms) to wait before waking the QueueFlusher
9591
private final int flushPeriodMs;
9692

97-
// Map to keep track of incident signatures for throttling incidents
98-
private final Map<String, AtomicInteger> incidentCounter;
99-
100-
// Map
101-
private final Map<String, DateTime> throttledIncidents;
102-
10393
// Queue to buffer events while they are waiting to be flushed
10494
private final ArrayList<Event> eventBuffer;
10595

@@ -117,9 +107,6 @@ public EventHandler(int maxEntries, int flushPeriodMs) {
117107
logBuffer = new ArrayList<>();
118108

119109
logDumpPathPrefix = EventUtil.getDumpPathPrefix();
120-
121-
incidentCounter = new HashMap<>();
122-
throttledIncidents = new HashMap<>();
123110
}
124111

125112
/**

src/main/java/net/snowflake/client/core/ExecTimeTelemetryData.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package net.snowflake.client.core;
22

3-
import com.google.common.base.Strings;
3+
import static net.snowflake.client.jdbc.SnowflakeUtil.isNullOrEmpty;
4+
45
import net.minidev.json.JSONObject;
56
import net.snowflake.client.jdbc.telemetryOOB.TelemetryService;
67
import net.snowflake.client.util.TimeMeasurement;
@@ -106,7 +107,7 @@ public void setRequestId(String requestId) {
106107
}
107108

108109
public void addRetryLocation(String location) {
109-
if (Strings.isNullOrEmpty(this.retryLocations)) {
110+
if (isNullOrEmpty(this.retryLocations)) {
110111
this.retryLocations = location;
111112
} else {
112113
this.retryLocations = this.retryLocations.concat(", ").concat(location);

src/main/java/net/snowflake/client/core/FileUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package net.snowflake.client.core;
22

3+
import static net.snowflake.client.jdbc.SnowflakeUtil.isNullOrEmpty;
34
import static net.snowflake.client.jdbc.SnowflakeUtil.isWindows;
45

5-
import com.google.common.base.Strings;
66
import java.io.File;
77
import java.io.IOException;
88
import java.nio.file.Files;
@@ -190,7 +190,7 @@ static String getFileOwnerName(Path filePath) throws IOException {
190190
}
191191

192192
private static String getContextStr(String context) {
193-
return Strings.isNullOrEmpty(context) ? "" : context + ": ";
193+
return isNullOrEmpty(context) ? "" : context + ": ";
194194
}
195195

196196
public static boolean exists(File file) {

0 commit comments

Comments
 (0)