Skip to content

Commit 07012c1

Browse files
author
Sagar Agarwal
committed
removed dependency on jetbrains annotations
1 parent feceddf commit 07012c1

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

google-cloud-spanner/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,6 @@
455455
<artifactId>opentelemetry-sdk-testing</artifactId>
456456
<scope>test</scope>
457457
</dependency>
458-
<dependency>
459-
<groupId>org.jetbrains</groupId>
460-
<artifactId>annotations</artifactId>
461-
<version>24.1.0</version>
462-
<scope>compile</scope>
463-
</dependency>
464458
</dependencies>
465459
<profiles>
466460
<profile>

google-cloud-spanner/src/main/java/com/google/cloud/spanner/Interval.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
package com.google.cloud.spanner;
1818

19+
import com.google.api.client.util.Preconditions;
1920
import com.google.errorprone.annotations.Immutable;
2021
import java.io.Serializable;
2122
import java.math.BigDecimal;
2223
import java.math.BigInteger;
2324
import java.util.regex.Matcher;
2425
import java.util.regex.Pattern;
25-
import org.jetbrains.annotations.NotNull;
2626

2727
/**
2828
* Represents the time duration as a combination of months, days and nanoseconds. Nanoseconds are
@@ -116,7 +116,7 @@ public static Interval ofMicros(long micros) {
116116
}
117117

118118
/** Creates an interval with specified number of nanoseconds. */
119-
public static Interval ofNanos(@NotNull BigInteger nanos) {
119+
public static Interval ofNanos(BigInteger nanos) {
120120
return builder().setNanos(nanos).build();
121121
}
122122

@@ -264,7 +264,7 @@ Builder setDays(int days) {
264264
}
265265

266266
Builder setNanos(BigInteger nanos) {
267-
this.nanos = nanos;
267+
this.nanos = Preconditions.checkNotNull(nanos);
268268
return this;
269269
}
270270

google-cloud-spanner/src/main/java/com/google/cloud/spanner/Value.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import javax.annotation.Nonnull;
5353
import javax.annotation.Nullable;
5454
import javax.annotation.concurrent.Immutable;
55-
import org.jetbrains.annotations.NotNull;
5655

5756
/**
5857
* Represents a value to be consumed by the Cloud Spanner API. A value can be {@code NULL} or
@@ -1862,8 +1861,9 @@ com.google.protobuf.Value valueToProto() {
18621861
return com.google.protobuf.Value.newBuilder().setStringValue(value.toISO8601()).build();
18631862
}
18641863

1864+
@Nonnull
18651865
@Override
1866-
public @NotNull String getAsString() {
1866+
public String getAsString() {
18671867
return isNull() ? NULL_STRING : value.toISO8601();
18681868
}
18691869
}
@@ -2888,7 +2888,7 @@ void appendElement(StringBuilder b, Interval element) {
28882888
}
28892889

28902890
@Override
2891-
String elementToString(@NotNull Interval element) {
2891+
String elementToString(Interval element) {
28922892
return element.toISO8601();
28932893
}
28942894
}

0 commit comments

Comments
 (0)