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

siblingElements in Element throws Null Pointer Exception #184

Closed
dakkad opened this issue Apr 12, 2012 · 2 comments
Closed

siblingElements in Element throws Null Pointer Exception #184

dakkad opened this issue Apr 12, 2012 · 2 comments

Comments

@dakkad
Copy link

dakkad commented Apr 12, 2012

Hi,

I have noticed that the sibling methods (nextSibling, previousSibling, siblingElements) rely on an element (underlying node) having a parent. If the node does not have a parent it throws null pointer exception.

Would it be possible to modify the code so that it checks for parent nullness around Node.java:468?

In the event of nullness return null as in the javadoc?

Confirmed in 1.6.2

@jhy jhy closed this as completed in 4b0dde4 Apr 14, 2012
@jhy
Copy link
Owner

jhy commented Apr 14, 2012

Thanks for pointing this out!

@dakkad
Copy link
Author

dakkad commented Apr 14, 2012

Very cool. Thanks for the quick response again. Awesome project.

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

No branches or pull requests

2 participants