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

NullPointerException in AssertionsFixer #535

Open
J3173 opened this issue Aug 31, 2023 · 0 comments
Open

NullPointerException in AssertionsFixer #535

J3173 opened this issue Aug 31, 2023 · 0 comments

Comments

@J3173
Copy link
Collaborator

J3173 commented Aug 31, 2023

When a path is given in the rules that doesn't exist in the archetype, the AssertionsFixer will throw a NullPointerException.

Archetype:

definition
    OBSERVATION[id1] matches {
        data matches {
            HISTORY[id2] matches {
                events matches {
                    POINT_EVENT[id3] matches {
                        data matches {
                            ITEM_TREE[id4]
                        }
                    }
                }
            }
        }
    }

rules
    /data[id2]/events[id3]/data[id4]/items[id404]/value/defining_code matches {[at404]}

Exception:

java.lang.NullPointerException
	at com.nedap.archie.rules.evaluation.AssertionsFixer.constructEmptySimpleObject(AssertionsFixer.java:148)
	at com.nedap.archie.rules.evaluation.AssertionsFixer.constructMissingStructure(AssertionsFixer.java:103)
	at com.nedap.archie.rules.evaluation.AssertionsFixer.fixAssertions(AssertionsFixer.java:50)
	at com.nedap.archie.rules.evaluation.RuleEvaluation.assertionEvaluated(RuleEvaluation.java:159)
	at com.nedap.archie.rules.evaluation.evaluators.AssertionEvaluator.evaluate(AssertionEvaluator.java:21)
	at com.nedap.archie.rules.evaluation.evaluators.AssertionEvaluator.evaluate(AssertionEvaluator.java:15)
	at com.nedap.archie.rules.evaluation.RuleEvaluation.evaluate(RuleEvaluation.java:116)
	at com.nedap.archie.rules.evaluation.RuleEvaluation.evaluate(RuleEvaluation.java:107)
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

1 participant