-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ConstructorInvokesOverridable: fix some false positives
Do not match methods of anonymous classes. Those methods can't be overriden because those classes can't be extended. Do not match methods of certain enum classes. It is not possible to override the methods of an enum class except in the (anonymous) class bodies of its enum constants. If all the enum constants lack class bodies, then the enum class's methods can't be overridden. Fix cases where the bug pattern would become confused about the receiver of unqualified or this-qualified method invocations, and where it would wrongly conclude that the method belonged to the instance under construction and issue a warning. Support @SuppressWarnings("ConstructorInvokesOverridable") on more Fixes #1449 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=286077091
- Loading branch information
1 parent
3ad1714
commit 41132da
Showing
3 changed files
with
207 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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