Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CtTypeReferenceImpl#canAccess does not properly handle sub-interface of another interface #1188

Closed
Aaron1011 opened this issue Feb 16, 2017 · 4 comments

Comments

@Aaron1011
Copy link

Per JLS Section 6.6.1, all members of an interface, including nesting interfaces, are implicitly public. However, CtTypeReferenceImpl#canAcess always treats a type with no modifiers as a package-private type. This leads to issues when Spoon is used to scan a interface containing sub-interface, as these interfaces will incorrectly be determined to be inaccessible by other classes.

@pvojtechovsky
Copy link
Collaborator

You are right, that is my code and it is wrong in this case. I will may be have time this evening to work on that. But if anybody else 👍 would have time to fix that, then put the note here and I might continue on #1005 instead :-)

@msteinbeck
Copy link
Contributor

@Aaron1011: Could you please add an example where this constrain fails?

@pvojtechovsky
Copy link
Collaborator

I am working on that issue

@monperrus
Copy link
Collaborator

closed per #1189. Thanks @Aaron1011 for the report, kudo @pvojtechovsky for the fix :-)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants