We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
You will find the following line in hasParent of CtElementImpl:
return getParent() == candidate || getParent().hasParent(candidate);
This assumes, that getParent may not return null. However, in line 50 of CtModelImpl null is explicitly returned:
{ this.setSimpleName(CtPackage.TOP_LEVEL_PACKAGE_NAME); this.setParent(new CtElementImpl() { @Override public void accept(CtVisitor visitor) { } @Override public CtElement getParent() throws ParentNotInitializedException { return null; } }); }
I got some cases (unfortunately they are to large to post here) in which this results to a NullPointerException.
The text was updated successfully, but these errors were encountered:
fix(parent): Avoid NPE with CtElement#hasParent(CtElement) (Closes #679)
5be4205
No branches or pull requests
You will find the following line in hasParent of CtElementImpl:
This assumes, that getParent may not return null. However, in line 50 of CtModelImpl null is explicitly returned:
I got some cases (unfortunately they are to large to post here) in which this results to a NullPointerException.
The text was updated successfully, but these errors were encountered: