Skip to content

Bug in validateTerminologyRequirements if-statement operator precedence #1617

@amondel2

Description

@amondel2

In CqlEngine.java, the validateTerminologyRequirements method has an if condition where the logical operators are not grouped correctly. Due to operator precedence, the expression is evaluated incorrectly.

Example:

(true) || (true) || (true) && false == true

evaluates to true because && binds tighter than ||.

The code should add parentheses to ensure the intended grouping, so that the condition evaluates as expected.

Expected: Expression should evaluate to false.
Actual: Expression evaluates to true.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions