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

Remove unused imports #354

Merged
merged 19 commits into from
Aug 26, 2024
Merged

Conversation

theron-wang
Copy link
Collaborator

Removes unused imports in all output files.

Take, for example, ManyImports in the included test case.
Previously:

package com.example;

import java.util.List;
import java.io.*;
import static java.util.Map.*;
import static java.lang.Math.sqrt;
import static java.lang.Math.PI;

public class ManyImports {
}

Now:

package com.example;

public class ManyImports {
}

Even if the import type is a used type element, it should still be removed if the current, minimized file does not contain any instances.

@theron-wang theron-wang requested a review from kelloggm August 14, 2024 20:53
@theron-wang
Copy link
Collaborator Author

@kelloggm No rush on the review, just whenever you're back and have time!

Copy link
Collaborator

@kelloggm kelloggm left a comment

Choose a reason for hiding this comment

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

Overall this is a great set of changes. Once my minor comments are addressed, this can be merged without another review.

@theron-wang
Copy link
Collaborator Author

Changes made; thanks.

@kelloggm kelloggm merged commit 4b16216 into njit-jerse:main Aug 26, 2024
3 checks passed
@theron-wang theron-wang deleted the remove-unused-imports branch August 26, 2024 16:14
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.

2 participants