Skip to content

feat(gax-java): add JSpecify Null annotations to gax - #13799

Merged
nnicolee merged 37 commits into
mainfrom
feat/jspecify-gax-auth
Jul 22, 2026
Merged

feat(gax-java): add JSpecify Null annotations to gax#13799
nnicolee merged 37 commits into
mainfrom
feat/jspecify-gax-auth

Merge branch 'main' into feat/jspecify-gax-auth

85d481c
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / [gapic-generator-java-root] SonarCloud Code Analysis failed Jul 22, 2026 in 1m 19s

Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
C Reliability Rating on New Code (required ≥ A)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Annotations

Check warning on line 77 in sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/GrpcDirectStreamingCallableTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Use a static import for "mock".

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9yCxdvMvoxo5ITr5WD&open=AZ9yCxdvMvoxo5ITr5WD&pullRequest=13799

Check failure on line 129 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/UnaryCallable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Fix the incompatibility of the annotation @NullMarked at class level to honor @Nullable of the overridden method.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxrifpAEM8k1u9liT&open=AZ9sxrifpAEM8k1u9liT&pullRequest=13799

Check warning on line 77 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/CheckingAttemptCallable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

This method's return value is marked "@NullMarked at class level" but null is returned.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxrxXpAEM8k1u9ljS&open=AZ9sxrxXpAEM8k1u9ljS&pullRequest=13799

Check warning on line 47 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/OpenTelemetryMetricsFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

"metricsRecorder" is marked "@NullMarked at class level" but is not initialized in this constructor.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxsTCpAEM8k1u9llV&open=AZ9sxsTCpAEM8k1u9llV&pullRequest=13799

Check warning on line 328 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/ClientContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Change this condition so that it does not always evaluate to "true"

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxr7upAEM8k1u9lj2&open=AZ9sxr7upAEM8k1u9lj2&pullRequest=13799

Check warning on line 54 in sdk-platform-java/gax-java/gax/src/test/java/com/google/api/gax/rpc/FixedWatchdogProviderTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Use a static import for "mock".

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9yCvzFMvoxo5ITr5VO&open=AZ9yCvzFMvoxo5ITr5VO&pullRequest=13799

Check warning on line 224 in sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/GrpcClientCallsTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Rename "mockChannel" which hides the field declared at line 92.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9xyqCacUMiqJpTVJVO&open=AZ9xyqCacUMiqJpTVJVO&pullRequest=13799

Check warning on line 657 in sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/longrunning/OperationsClient.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in constructor declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9uiJDbTAot3AzgTSwY&open=AZ9uiJDbTAot3AzgTSwY&pullRequest=13799

Check warning on line 54 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/retrying/BasicResultRetryAlgorithm.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

This method's return value is marked "@NullMarked at class level" but null is returned.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxsDcpAEM8k1u9lkU&open=AZ9sxsDcpAEM8k1u9lkU&pullRequest=13799

Check warning on line 133 in sdk-platform-java/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonClientCallImpl.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

"requestHeaders" is marked "@NullMarked at class level" but is not initialized in this constructor.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxslJpAEM8k1u9lmm&open=AZ9sxslJpAEM8k1u9lmm&pullRequest=13799

Check warning on line 155 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/Callables.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in constructor declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9uiHisTAot3AzgTSvV&open=AZ9uiHisTAot3AzgTSvV&pullRequest=13799

Check warning on line 103 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/retrying/ExponentialRetryAlgorithm.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in method 'getInitialTimeout' declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9uiIAVTAot3AzgTSvj&open=AZ9uiIAVTAot3AzgTSvj&pullRequest=13799

Check warning on line 79 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Remove this expression which always evaluates to "true"

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxrdopAEM8k1u9liN&open=AZ9sxrdopAEM8k1u9liN&pullRequest=13799

Check warning on line 336 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/EndpointContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Change this condition so that it does not always evaluate to "false"

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxruCpAEM8k1u9lit&open=AZ9sxruCpAEM8k1u9lit&pullRequest=13799

Check warning on line 247 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/retrying/RetryAlgorithm.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in method 'shouldRetry' declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ-GUzJj13EHziOTdOBq&open=AZ-GUzJj13EHziOTdOBq&pullRequest=13799

Check warning on line 122 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiExceptionFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in constructor declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxrwgpAEM8k1u9ljF&open=AZ9sxrwgpAEM8k1u9ljF&pullRequest=13799

Check warning on line 509 in sdk-platform-java/gax-java/gax/src/test/java/com/google/api/gax/rpc/OperationCallableImplTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Use a static import for "mock".

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9yCvsiMvoxo5ITr5Ux&open=AZ9yCvsiMvoxo5ITr5Ux&pullRequest=13799

Check warning on line 254 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/retrying/RetryAlgorithm.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Change this condition so that it does not always evaluate to "false"

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxsCTpAEM8k1u9lkJ&open=AZ9sxsCTpAEM8k1u9lkJ&pullRequest=13799

Check warning on line 181 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/BidiStreamingCallable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in method 'internalCall' declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxrsRpAEM8k1u9lim&open=AZ9sxrsRpAEM8k1u9lim&pullRequest=13799

Check warning on line 127 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/OpenTelemetryTracingFactory.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in method 'getTracer' declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9uiIUGTAot3AzgTSvz&open=AZ9uiIUGTAot3AzgTSvz&pullRequest=13799

Check warning on line 61 in sdk-platform-java/gax-java/gax/src/test/java/com/google/api/gax/rpc/RetryingTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Use a static import for "mock".

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9yCvzrMvoxo5ITr5VR&open=AZ9yCvzrMvoxo5ITr5VR&pullRequest=13799

Check warning on line 260 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/ApiClientHeaderProvider.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Change this condition so that it does not always evaluate to "false"

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxrdopAEM8k1u9liK&open=AZ9sxrdopAEM8k1u9liK&pullRequest=13799

Check warning on line 503 in sdk-platform-java/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallContext.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Add the missing @deprecated Javadoc tag.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9uiIivTAot3AzgTSwF&open=AZ9uiIivTAot3AzgTSwF&pullRequest=13799

Check warning on line 87 in sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/rpc/CheckingAttemptCallable.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Annotate the parameter with @javax.annotation.Nullable in method 'futureCall' declaration, or make sure that null can not be passed as argument.

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9sxrxXpAEM8k1u9ljT&open=AZ9sxrxXpAEM8k1u9ljT&pullRequest=13799

Check warning on line 93 in sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/TimeoutTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / [gapic-generator-java-root] SonarCloud Code Analysis

Use a static import for "mock".

See more on https://sonarcloud.io/project/issues?id=googleapis_google-cloud-java_showcase&issues=AZ9yCxaNMvoxo5ITr5V4&open=AZ9yCxaNMvoxo5ITr5V4&pullRequest=13799