Skip to content
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

UnnecessarilyFullyQualified: handle java.lang and inconsistent import usages #2776

Conversation

rickie
Copy link
Contributor

@rickie rickie commented Dec 23, 2021

This introduces two improvements:

  • Where possible java.lang.SomeType references are simplified to SomeType
    without introducing an associated import statement.
  • References to some.package.SomeType are now also replaced with SomeType
    if said type is already imported and referenced by its simple name elsewhere
    in the compilation unit.

Copy link
Contributor

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested against the Picnic code base with positive results 👍

@Stephan202 Stephan202 force-pushed the rossendrijver/java_lang_qualified branch from 8051af2 to 1dae0db Compare January 2, 2022 13:21
@Stephan202
Copy link
Contributor

Rebased the branch so that the JDK 18-ea build now passes. (IIUC @cushon's approval already caused a Google-internal PR to be opened, so this is mostly for bookkeeping purposes.)

@copybara-service copybara-service bot closed this in c07a7a9 Jan 4, 2022
@Stephan202 Stephan202 deleted the rossendrijver/java_lang_qualified branch January 6, 2022 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants