-
Notifications
You must be signed in to change notification settings - Fork 135
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
Dramatically simplify the UnnecessarilyQualified check #2998
Dramatically simplify the UnnecessarilyQualified check #2998
Conversation
Generate changelog in
|
Previously we did a rather invasive search on every MemberSelectTree. Now, we first check that the symbol is a type, and the select is operating upon a package, ruling out unnecessary treepath traversals and import scans.
dd6b88b
to
455d47d
Compare
"import java.util.Map;", | ||
"import java.util.Map.Entry;", | ||
"import java.util.Set;", | ||
"class Test {", | ||
" Map.Entry<?, ?> get() {", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some may prefer for this to end up as Entry
rather than Map.Entry
, but I'd argue that either one is better than java.util.Map.Entry
(and I prefer to list enclosing classes rather than importing them, but that's a stylistic choice).
Released 6.10.0 |
Thank you for this change -- it reduced Before:
After:
An unscientific test -- there other changes in the repo than just this change. But it is vastly better now, and I'm going to turn this back on. |
Before this PR
See #2997
Previously we did a rather invasive search on every MemberSelectTree.
After this PR
Now, we first check that the symbol is a type, and the select is operating upon a package, ruling out unnecessary treepath traversals and import scans.
==COMMIT_MSG==
Dramatically simplify the UnnecessarilyQualified error-prone check
==COMMIT_MSG==