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

Fixes #1125. #1128

Merged
merged 1 commit into from
Jan 18, 2017
Merged

Fixes #1125. #1128

merged 1 commit into from
Jan 18, 2017

Conversation

msteinbeck
Copy link
Contributor

No description provided.

return RtHelper.getAllExecutables(getActualClass(), getFactory());
} catch (final SpoonClassNotFoundException e) {
if (getFactory().getEnvironment().getNoClasspath()) {
return Collections.emptyList();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was not sure if I should return an empty list or null. When changing this to null, there is another method to fix as it uses a for each loop without checking the type returned by this method. However, I used null since CtTypeImpl instantiates typeMembers with an empty list indicating that an unknown type has no methods.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Returning EmptyList as you did here is better.

@surli surli merged commit 5b21903 into INRIA:master Jan 18, 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