File tree Expand file tree Collapse file tree 3 files changed +6
-12
lines changed
src/main/java/com/google/cloud/spanner Expand file tree Collapse file tree 3 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 1616
1717package com .google .cloud .spanner ;
1818
19+ import com .google .api .client .util .Preconditions ;
1920import com .google .errorprone .annotations .Immutable ;
2021import java .io .Serializable ;
2122import java .math .BigDecimal ;
2223import java .math .BigInteger ;
2324import java .util .regex .Matcher ;
2425import 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
Original file line number Diff line number Diff line change 5252import javax .annotation .Nonnull ;
5353import javax .annotation .Nullable ;
5454import 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 }
You can’t perform that action at this time.
0 commit comments