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

Conversation

@nnicolee

@nnicolee nnicolee commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR migrates the GAX (sdk-platform-java/gax-java) library to use JSpecify 1.0.0 nullability annotations (@NullMarked and @Nullable), replacing the previous javax.annotation references.

Key Changes

JSpecify 1.0.0 Annotation Adoption in GAX:

  • Applied @NullMarked at the class and package levels across GAX core classes to define non-null by default semantics.
  • Replaced imports of javax.annotation.Nullable with org.jspecify.annotations.Nullable.
  • Adopted type-use nullability declarations for generic parameters, arrays, and API settings (e.g. java.time.@Nullable Duration, List<@Nullable T>).

Verification Results

gemini-code-assist[bot]

This comment was marked as outdated.

@nnicolee
nnicolee requested a review from lqiu96 July 17, 2026 05:12
nnicolee and others added 25 commits July 17, 2026 17:27
Disable annotations in Mockito mocks for GAX classes across 17 test
files in `google-cloud-bigtable` to avoid ArrayStoreException on Java 8.
These tests were missed in the previous round of fixes.

TAG=agy
CONV=de3ef09d-a26c-4190-b578-4c993f807bdc
@lqiu96

lqiu96 commented Jul 21, 2026

Copy link
Copy Markdown
Member

/gemini review

gemini-code-assist[bot]

This comment was marked as resolved.

@lqiu96

lqiu96 commented Jul 21, 2026

Copy link
Copy Markdown
Member

/gemini review

gemini-code-assist[bot]

This comment was marked as resolved.

@nnicolee nnicolee added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@nnicolee
nnicolee marked this pull request as ready for review July 22, 2026 15:13
@nnicolee
nnicolee requested review from a team as code owners July 22, 2026 15:13
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@lqiu96 lqiu96 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 22, 2026
@nnicolee
nnicolee enabled auto-merge (squash) July 22, 2026 19:42
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
C Reliability Rating on New Code (required ≥ A)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

💡 Need a hand with PR review? Try Gitar by Sonar!

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

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

💡 Need a hand with PR review? Try Gitar by Sonar!

@nnicolee
nnicolee merged commit 65aee08 into main Jul 22, 2026
294 of 297 checks passed
@nnicolee
nnicolee deleted the feat/jspecify-gax-auth branch July 22, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants