Skip to content

Commit afcc598

Browse files
authored
fix: use javax.annotation.Nonnull in executor framework (#2414)
* fix: use javax.annotation.Nonnull in executor framework Remove an additional dependency on org.jetbrains.annotations and use javax.annotation.Nonnull.
1 parent 701649e commit afcc598

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

google-cloud-spanner-executor/pom.xml

-7
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,6 @@
121121
<artifactId>commons-io</artifactId>
122122
<version>2.11.0</version>
123123
</dependency>
124-
125-
<dependency>
126-
<groupId>org.jetbrains</groupId>
127-
<artifactId>annotations</artifactId>
128-
<version>RELEASE</version>
129-
<scope>compile</scope>
130-
</dependency>
131124
</dependencies>
132125
<build>
133126
<finalName>google-spanner-cloud-executor</finalName>

google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@
168168
import java.util.logging.Level;
169169
import java.util.logging.Logger;
170170
import java.util.stream.Collectors;
171+
import javax.annotation.Nonnull;
171172
import javax.annotation.Nullable;
172173
import org.apache.commons.io.FileUtils;
173-
import org.jetbrains.annotations.NotNull;
174174
import org.threeten.bp.Duration;
175175
import org.threeten.bp.LocalDate;
176176

@@ -652,7 +652,7 @@ public synchronized void bufferMutations(List<Mutation> mutations) throws Spanne
652652
}
653653

654654
/** Execute a batch of updates in a read-write transaction. */
655-
public synchronized long[] executeBatchDml(@NotNull List<Statement> stmts)
655+
public synchronized long[] executeBatchDml(@Nonnull List<Statement> stmts)
656656
throws SpannerException {
657657
for (int i = 0; i < stmts.size(); i++) {
658658
LOGGER.log(
@@ -3323,7 +3323,7 @@ private static com.google.cloud.spanner.Type typeProtoToCloudType(
33233323
}
33243324

33253325
/** Convert a cloud Type to a Type proto. */
3326-
private static com.google.spanner.v1.Type cloudTypeToTypeProto(@NotNull Type cloudTypeProto) {
3326+
private static com.google.spanner.v1.Type cloudTypeToTypeProto(@Nonnull Type cloudTypeProto) {
33273327
switch (cloudTypeProto.getCode()) {
33283328
case BOOL:
33293329
return com.google.spanner.v1.Type.newBuilder().setCode(TypeCode.BOOL).build();

0 commit comments

Comments
 (0)