-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug adding import to a list of imports containing duplicate impor…
…ts. (#4197) * Fix bug adding import to a list of imports containing duplicate imports. Problem: - The presence check does not take the member of static imports into consideration - The comparison by size cannot handle the case where the original imports contain duplicated imports making its the size be equal to that of the ideally ordered, distinct imports even after adding a new import Fix: check the presence using the fully qualified names of imports. * Use a for loop as is common elsewhere to limit object creations * Adopt TypeUtils instead of String comparison * Guard against a null added type --------- Co-authored-by: Hoan Nguyen <[email protected]> Co-authored-by: Tim te Beek <[email protected]>
- Loading branch information
1 parent
a164e19
commit 46d21d6
Showing
2 changed files
with
53 additions
and
17 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