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

Avoid NullPointerException in CtExecutableReferenceImpl. #809

Merged
merged 2 commits into from
Sep 2, 2016

Conversation

msteinbeck
Copy link
Contributor

According to JavaDoc, getDeclaringType() may return null. Until now,
getDeclaration, does not handle the null case and, therefore, may
throw a NullPointerException. This exception is thrown most likely in
noclasspath mode. Fixes #808.

According to JavaDoc, `getDeclaringType()` may return null. Until now,
`getDeclaration`, does not handle the null case and, therefore, may
throw a NullPointerException. This exception is throws most likely in
noclasspath mode.  Fixes INRIA#808.
@msteinbeck
Copy link
Contributor Author

As you can see in the test case, the unknown method has to be called from an Array. Otherwise, the current implementation returns null instead of throwing a NullPointerException. Maybe the AST generator has to be fixed too, since it looks like it is missing to set declaringType in case of Arrays.

@monperrus
Copy link
Collaborator

thanks

@tdurieux tdurieux mentioned this pull request Sep 19, 2016
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