-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ErrorProne flags Subscribe annotated methods as UnusedMethod #6281
Comments
Thanks. It looks like That special case predates the creation of |
(I should always take EventBus bugs as an opportunity to point people to our docs that recommend against using it if you can help it. But we should fix this regardless.) |
…aliper.Benchmark, com.google.common.eventbus.Subscribe, and com.google.inject.throwingproviders.CheckedProvides. Fixes google/guava#6281 PiperOrigin-RevId: 497961342
…aliper.Benchmark, com.google.common.eventbus.Subscribe, and com.google.inject.throwingproviders.CheckedProvides. Fixes google/guava#6281 PiperOrigin-RevId: 497980825
This will be fixed in the next Error Prone release. It's probably true that |
We've found that ErrorProne flags all
@Subscribe
annotated methods with an UnusedMethod warningErrorProne has a Keep annotation which could be applied to the Subscribe annotation in order to avoid this.
The alternatives seem to be suppressing the warning for each method or adding the subscribe annotation to a growing exemption list.
Would you be open to a PR to annotate Subscribe with @keep?
The text was updated successfully, but these errors were encountered: