Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use javax.annotation.Nonnull in executor framework #2414

Merged
merged 2 commits into from
May 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions google-cloud-spanner-executor/pom.xml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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