Skip to content

Commit 710d7f3

Browse files
committed
fix(bigtable): resolve NullArgumentForNonNullParameter error in MaybePointWriteCallableTest
Fixes #14174 Replace redundant Truth assertThat((Object) future.get()).isNull() on ApiFuture<Void> with direct future.get() to avoid ErrorProne NullArgumentForNonNullParameter false-positives under GraalVM / JDK 21 CI. Also assert returned future in multipleEntries_fallsThroughToClassic to satisfy FutureReturnValueIgnored.
1 parent 0d5fac0 commit 710d7f3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

java-bigtable/google-cloud-bigtable/src/test/java/com/google/cloud/bigtable/data/v2/stub/mutaterows/MaybePointWriteCallableTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void singleEntry_routesToPointWriter() throws Exception {
5656
ApiFuture<Void> future = callable.futureCall(request, null);
5757
pointWriter.response.set(null);
5858

59-
assertThat((Object) future.get()).isNull();
59+
future.get();
6060
assertThat(classic.request).isNull();
6161
assertThat(pointWriter.request).isNotNull();
6262
// The single entry is converted back into a RowMutation targeting the same row.
@@ -70,8 +70,9 @@ public void multipleEntries_fallsThroughToClassic() {
7070
.add("row-a", Mutation.create().deleteRow())
7171
.add("row-b", Mutation.create().deleteRow());
7272

73-
callable.futureCall(request, null);
73+
ApiFuture<Void> future = callable.futureCall(request, null);
7474

75+
assertThat(future).isSameInstanceAs(classic.response);
7576
assertThat(pointWriter.request).isNull();
7677
assertThat(classic.request).isEqualTo(request);
7778
}

0 commit comments

Comments
 (0)