Repository navigation
fix(gax): drop jsr305 annotations left over after syncing with main - #14626
Open
macastelaz wants to merge 1 commit into
Open
macastelaz wants to merge 1 commit into
macastelaz wants to merge 1 commit into
Conversation
main no longer declares com.google.code.findbugs:jsr305 for gax-grpc and gax-httpjson, so the two javax.annotation uses added by the certificate rotation work fail dependency:analyze (used undeclared dependency): - ChannelPool: replace @GuardedBy (javax.annotation.concurrent) with a comment; gax-grpc does not depend on Error Prone annotations. - RefreshingHttpJsonChannelTest: use org.jspecify.annotations.Nullable, as the rest of gax does.
Contributor
There was a problem hiding this comment.
Code Review
This pull request replaces the javax.annotation.concurrent.GuardedBy annotation with a comment in ChannelPool.java and updates RefreshingHttpJsonChannelTest.java to use org.jspecify.annotations.Nullable instead of javax.annotation.Nullable. There are no review comments, and I have no additional feedback to provide.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
After the
mainsync (03af2000542), thedependenciescheck fails on every PR targeting this branch, for example #14559:mainmoved GAX offjsr305: it uses JSpecify for nullness, andgax-grpc/gax-httpjsonno longer declarejsr305. Twojavax.annotationuses that came in with #13995 (certificate rotation retries) are still on this branch. They compile, becausejsr305still arrives transitively, butdependency:analyzecorrectly flags them.What changes
These are annotation-only edits with no behavior change:
gax-grpc/.../ChannelPool.java: the@GuardedBy("entryWriteLock")annotation (fromjavax.annotation.concurrent) becomes a// Guarded by entryWriteLock.comment. I didn't switch to Error Prone's@GuardedBy, becausegax-grpcdoesn't depend on Error Prone annotations, so that would just trade one undeclared dependency for another. Onmain,gax-grpcuses no@GuardedBy.gax-httpjson/.../RefreshingHttpJsonChannelTest.java:javax.annotation.Nullablebecomesorg.jspecify.annotations.Nullable, as in the rest of GAX.These are the only
javax.annotationimports ingax-java,google-auth-library-javaandjava-corethat are on this branch but not onmain.Tests
dependency:analyzewas run the same way as.kokoro/dependencies.sh(mvn dependency:analyze -Pquick-build -DfailOnWarning=true -Dmdep.analyze.skip=false) ongax-grpcandgax-httpjson:Used undeclared dependencies found: com.google.code.findbugs:jsr305, BUILD FAILURE (the same as CI);Unit tests:
gax-grpc252 andgax-httpjson234 tests, 0 failures.fmtis clean.