Skip to content

Remove JSR-305 ThreadSafe annotation and replace with JavaDoc#12762

Open
Kainsin wants to merge 2 commits intogrpc:masterfrom
Kainsin:master
Open

Remove JSR-305 ThreadSafe annotation and replace with JavaDoc#12762
Kainsin wants to merge 2 commits intogrpc:masterfrom
Kainsin:master

Conversation

@Kainsin
Copy link
Copy Markdown
Contributor

@Kainsin Kainsin commented Apr 17, 2026

This is another attempt to remove JSR-305 annotations but instead of replacing with ErrorProne's ThreadSafe, sticks to adding a JavaDoc comment. This should basically keep things inline with what JSR-305 ThreadSafe affords.

Adding ErrorProne's ThreadSafe can be considered in the future, as it expects more things than JSR-305.

Removing the JSR-305 dependency here allows Java applications that have moved away from javax to compile and avoids a bug in Immutables and Lombok (and possibly other annotation processors) from failing when JSR-305 is not present.

@Kainsin Kainsin marked this pull request as ready for review April 17, 2026 15:39
@Kainsin
Copy link
Copy Markdown
Contributor Author

Kainsin commented Apr 17, 2026

I am not sure why that test is failing - it's passing locally. Am I missing a configuration setting that is causing an extra log to be emitted here?

Kainsin added 2 commits April 20, 2026 11:20
This fixes a potential race condition where a test runs a thread in
the executor that does some logging. Without waiting for threads to
finish, another test can be run while that background thread is still
executing. This can cause flaky issues with tests that only think
that their test code is executing.
@Kainsin
Copy link
Copy Markdown
Contributor Author

Kainsin commented Apr 20, 2026

I was able to make a change to fix the test - it's in the second commit.

@kannanjgithub you reviewed my last PR for this, would you be able to review this one as well? Thanks!

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.

1 participant