From e66490c2e61d105726b011b78e465ef410ed16d3 Mon Sep 17 00:00:00 2001
From: Rajat Bhatta <93644539+rajatbhatta@users.noreply.github.com>
Date: Fri, 5 May 2023 17:22:33 +0530
Subject: [PATCH 1/2] fix: use javax.annotation.Nonnull in executor framework
Remove an additional dependency on org.jetbrains.annotations and use javax.annotation.Nonnull.
---
google-cloud-spanner-executor/pom.xml | 7 -------
1 file changed, 7 deletions(-)
diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml
index a668a6f0fd2..131d6503967 100644
--- a/google-cloud-spanner-executor/pom.xml
+++ b/google-cloud-spanner-executor/pom.xml
@@ -121,13 +121,6 @@
commons-io
2.11.0
-
-
- org.jetbrains
- annotations
- RELEASE
- compile
-
google-spanner-cloud-executor
From 2e4bce74da16a4abad14de49ff57807bae899b40 Mon Sep 17 00:00:00 2001
From: Rajat Bhatta <93644539+rajatbhatta@users.noreply.github.com>
Date: Fri, 5 May 2023 17:24:20 +0530
Subject: [PATCH 2/2] Update CloudClientExecutor.java
---
.../google/cloud/executor/spanner/CloudClientExecutor.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
index f4b59505b01..651a920dec2 100644
--- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
+++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
@@ -168,9 +168,9 @@
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
+import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.apache.commons.io.FileUtils;
-import org.jetbrains.annotations.NotNull;
import org.threeten.bp.Duration;
import org.threeten.bp.LocalDate;
@@ -652,7 +652,7 @@ public synchronized void bufferMutations(List mutations) throws Spanne
}
/** Execute a batch of updates in a read-write transaction. */
- public synchronized long[] executeBatchDml(@NotNull List stmts)
+ public synchronized long[] executeBatchDml(@Nonnull List stmts)
throws SpannerException {
for (int i = 0; i < stmts.size(); i++) {
LOGGER.log(
@@ -3323,7 +3323,7 @@ private static com.google.cloud.spanner.Type typeProtoToCloudType(
}
/** Convert a cloud Type to a Type proto. */
- private static com.google.spanner.v1.Type cloudTypeToTypeProto(@NotNull Type cloudTypeProto) {
+ private static com.google.spanner.v1.Type cloudTypeToTypeProto(@Nonnull Type cloudTypeProto) {
switch (cloudTypeProto.getCode()) {
case BOOL:
return com.google.spanner.v1.Type.newBuilder().setCode(TypeCode.BOOL).build();