Skip to content

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

Closed
rickie wants to merge 1 commit intogoogle:masterfrom
PicnicSupermarket:rossendrijver/java_lang_qualified
Closed

UnnecessarilyFullyQualified: handle java.lang and inconsistent import usages#2776
rickie wants to merge 1 commit intogoogle:masterfrom
PicnicSupermarket:rossendrijver/java_lang_qualified

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.

3 participants