Skip to content

1617: fix(engine): correct operator precedence in validateTerminology…#1618

Closed
amondel2 wants to merge 1 commit intocqframework:masterfrom
amondel2:1617
Closed

1617: fix(engine): correct operator precedence in validateTerminology…#1618
amondel2 wants to merge 1 commit intocqframework:masterfrom
amondel2:1617

Conversation

@amondel2
Copy link
Copy Markdown

@amondel2 amondel2 commented Oct 3, 2025

1617: The if condition in validateTerminologyRequirements was incorrectly evaluating due to missing parentheses. Because '&&' has higher precedence than '||', the expression:

(A || B || C && D)
was being evaluated as:
(A || B || (C && D))
instead of the intended:
((A || B || C) && D)

This caused terminology requirements to throw an exception in cases when a TerminologyProvider was configured with a library with ValueSets.

Fix: Add explicit parentheses so the check correctly validates as intended.

…Requirements

      The if condition in validateTerminologyRequirements was incorrectly
      evaluating due to missing parentheses. Because `&&` has higher
      precedence than `||`, the expression:

          (A || B || C && D)

      was being evaluated as:

          (A || B || (C && D))

      instead of the intended:

          ((A || B || C) && D)

      This caused terminology requirements to be bypassed in some cases
      when a TerminologyProvider was not configured.

      Fix: Add explicit parentheses so the check correctly enforces that
      any terminology usage requires a TerminologyProvider.
@JPercival
Copy link
Copy Markdown
Contributor

We'll update in the new Kotlin code. Thanks for the contribution

@JPercival
Copy link
Copy Markdown
Contributor

@amondel2 - We couldn't push to your branch to fix the merge conflict, so we took it in #1684

@JPercival JPercival closed this Feb 19, 2026
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

Successfully merging this pull request may close these issues.

3 participants