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

RemoveUnusedImports should retain explicit import when there are conflicting classes in the same package #4482

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

Laurens-W
Copy link
Contributor

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

@timtebeek

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@Laurens-W Laurens-W added the bug Something isn't working label Sep 10, 2024
@Laurens-W Laurens-W requested a review from timtebeek September 10, 2024 09:27
@Laurens-W Laurens-W self-assigned this Sep 10, 2024
@Laurens-W Laurens-W changed the title Add testcase RemoveImport should not leave code behind that at runtime throws an error: incompatible types Sep 10, 2024
@Laurens-W Laurens-W changed the title RemoveImport should not leave code behind that at runtime throws an error: incompatible types RemoveUnusedImports should not leave code behind that at runtime throws an error: incompatible types Sep 10, 2024
@Laurens-W Laurens-W changed the title RemoveUnusedImports should not leave code behind that at runtime throws an error: incompatible types RemoveUnusedImports should not leave code behind that throws an error: incompatible types when trying to compile Sep 10, 2024
@Laurens-W Laurens-W changed the title RemoveUnusedImports should not leave code behind that throws an error: incompatible types when trying to compile RemoveUnusedImports should not leave code behind that throws an error: incompatible types when trying to compile Sep 10, 2024
* fix whitespace
* clearer test method name
* clearer class name
@timtebeek timtebeek changed the title RemoveUnusedImports should not leave code behind that throws an error: incompatible types when trying to compile RemoveUnusedImports should retain explicit import when there are conflicting classes in the same package Sep 10, 2024
@timtebeek timtebeek marked this pull request as ready for review September 10, 2024 09:52
@timtebeek timtebeek added the test provided Already replicated with a unit test, using JUnit pioneer's ExpectedToFail label Sep 10, 2024
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Great to see this case was now already handled; Approved as a safe guard going forward with one last small suggestion to go from 3 to 4 spaces in test class.

@Laurens-W Laurens-W merged commit 7f14d4a into main Sep 10, 2024
2 checks passed
@Laurens-W Laurens-W deleted the incompatible-types-remove-import branch September 10, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test provided Already replicated with a unit test, using JUnit pioneer's ExpectedToFail
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants