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

fix: NPE in isInSamePackage() and canAccess() #3032

Merged
merged 1 commit into from
Jun 23, 2019

Conversation

Egor18
Copy link
Contributor

@Egor18 Egor18 commented Jun 22, 2019

fix #2845
I managed to reproduce NPE inside canAccess() and isInSamePackage() in noclasspath mode.
It turned out that NPE occurs if the type is null or if type.getPackage() returns null (it's a generic type for example).
So this PR is to fix that.

@Egor18 Egor18 changed the title fix: NPE in canAccess() fix: NPE in isInSamePackage() and canAccess() Jun 22, 2019
@monperrus monperrus merged commit 8e19856 into INRIA:master Jun 23, 2019
@monperrus
Copy link
Collaborator

Many thanks. Noclasspath is always a NPE nightmare.

@monperrus monperrus mentioned this pull request Jul 25, 2019
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.

NPE in CtTypeReferenceImpl#isInSamePackage in noclasspath
2 participants