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

review: fix: ImportBuilder to check visibility when importing starred imports #1588

Merged

Conversation

surli
Copy link
Collaborator

@surli surli commented Oct 11, 2017

Fix #1587

@surli surli changed the title fix: ImportBuilder to check visibility when importing starred imports review: fix: ImportBuilder to check visibility when importing starred imports Oct 11, 2017
@@ -78,7 +78,9 @@ public void build() {

if (ctPackage != null) {
for (CtType type : ctPackage.getTypes()) {
this.imports.add(type.getReference());
if (type.getVisibility() == ModifierKind.PUBLIC) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

should also work with package-visible if both classes are in the same package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but if both classes are in the same packages, it's useless to import them...

@monperrus monperrus merged commit be79969 into INRIA:master Oct 11, 2017
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