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

Null pointer exception if occurences == null in parent and child #635

Open
wolandscat opened this issue Oct 14, 2024 · 0 comments
Open

Null pointer exception if occurences == null in parent and child #635

wolandscat opened this issue Oct 14, 2024 · 0 comments
Labels

Comments

@wolandscat
Copy link
Member

See here in the routine SpecializedOccurrencesValidation.childNodesConformToParent.

The code does not handle the simple case when the parent archetype has no occurrences on a node and the child archetype doesn't mention the node, or else also has no occurrences on it.

The fix I made is to change the test to:

        if(parentCObject.getNodeId().equals(childCObject.getNodeId()) &&
                parentNodeOccurrences == null? childNodeOccurrences == null:
                parentNodeOccurrences.equals(childNodeOccurrences))

Raising here in case I don't manage to raise a proper PR with new test.

@wolandscat wolandscat added the bug label Oct 14, 2024
wolandscat added a commit to S2health/archie that referenced this issue Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant