Skip to content

Commit

Permalink
fix: use javax.annotation.Nonnull in executor framework (#2414)
Browse files Browse the repository at this point in the history
* fix: use javax.annotation.Nonnull in executor framework

Remove an additional dependency on org.jetbrains.annotations and use javax.annotation.Nonnull.
  • Loading branch information
rajatbhatta committed May 5, 2023
1 parent 701649e commit afcc598
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 0 additions & 7 deletions google-cloud-spanner-executor/pom.xml
Expand Up @@ -121,13 +121,6 @@
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>

<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>google-spanner-cloud-executor</finalName>
Expand Down
Expand Up @@ -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;

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

/** Execute a batch of updates in a read-write transaction. */
public synchronized long[] executeBatchDml(@NotNull List<Statement> stmts)
public synchronized long[] executeBatchDml(@Nonnull List<Statement> stmts)
throws SpannerException {
for (int i = 0; i < stmts.size(); i++) {
LOGGER.log(
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit afcc598

Please sign in to comment.