-
Notifications
You must be signed in to change notification settings - Fork 745
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
False positive in UnnecessaryDefaultInEnumSwitch
triggered by (presumed) compiler bug
#849
Comments
A colleague of mine hit this issue again earlier this week. We were not (yet) successful in tracking down what actually causes the NPE. In PR #1020 the code is updated to no longer log the stacktrace you see above. I'd like to ask that instead/additionally the first suggestion above (the |
"Fixes" #849 RELNOTES: N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=195434516
"Fixes" #849 RELNOTES: N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=195434516
Issue update: In PR #1023 the suggestion to NB: my colleague saw the issue go away by itself when he moved some Immutables interfaces to another package in another Maven module. We won't dig deeper into this, but I suspect the associated classpath change or the involvement of an annotation processor is relevant here. |
@cushon your fix in 9f94242 was modified in 02cebcd, such that non- If you think the earlier suggestion to prune certain compiler arguments makes sense I can file a PR with a proposal. (The NPE shown above still reproduces with AdoptOpenJDK 11.0.5+10. With a debugger I can see that it happens when doclint analyzes the class Javadoc of an Immutables-generated type derived from an interface nested in an abstract class; for this type |
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Something like this: PicnicSupermarket/error-prone@ee33249, optionally optimized by placing the flags to be filtered in an |
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
An updated version of the above commit, compatible with Error Prone 2.5.1, can be found at PicnicSupermarket/error-prone@10bd828. |
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
An updated version of the above commit, compatible with Error Prone 2.10.0, can be found at PicnicSupermarket/error-prone@0d7427a. |
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
Under certain circumstances this avoids triggering a compiler bug. It is also expected to speed up the trial compilation somewhat. The implicit assumption here is that it is okay to suggest a fix which introduces another warning. (This may not be so in general, but the introduced warning may be less severe or may be resolved manually.) See google#849.
I cannot provide a small reproduction case yet, but let me describe the situation.
Some code triggers the following warning:
In actuality this code is covered by case 3: the
default
clause cannot be removed without breaking the code.Above this warning the following stacktrace is logged:
This stacktrace is logged at SuggestedFixes.java:662. When I drop the
-Xdoclint:reference
flag from our build configuration no stacktrace is logged and the false positive goes away.I have two questions for the Error Prone team:
return false
statement afterSuggestedFixes.java:662
, just to be safe?#compilesWithFix
is very expensive, so perhaps it's worthwhile to drop-Xdoclint
and certain other flags. (Such as-verbose
; nobody's reading the output anyway.)The text was updated successfully, but these errors were encountered: