forked from google/error-prone
-
Notifications
You must be signed in to change notification settings - Fork 0
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 elements. Fixes google#656.
- Loading branch information
1 parent
653d1ef
commit 1e8dcb5
Showing
3 changed files
with
204 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