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

Small change to util:node-by-id to avoid unexpected NPE #3383

Merged
merged 1 commit into from Apr 21, 2020

Conversation

wolfgangmm
Copy link
Member

util:node-by-id should be changed to always check if the node identified by its nodeId does actually exist within the document or return an empty sequence instead. Not checking may lead to an undesirable and confusing NPE as a follow up. Instead we want to be able to determine that the node was not found.

Fixes the NPE reported here: #3363 (comment)

Type of tests:

Test included.

…d by its nodeId does actually exist within the document or return an empty sequence instead. Not checking may lead to an undesirable NPE as a follow up.
@adamretter adamretter merged commit c805292 into eXist-db:develop Apr 21, 2020
@adamretter adamretter added this to the eXist-5.2.1 milestone Apr 21, 2020
@adamretter adamretter added the bug issue confirmed as bug label Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue confirmed as bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants