Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(spdx-utils): Do not test for sub-expressions based on strings
The string-approach fails for compound expressions whose second operand ends with an exception (the `WITH` operator binds stronger than `AND` / `OR`). As the string comparison was meant as a performance optimization any anyway, just remove it. In exchange, a special case for the `AND` operator is required, for which the `containsAll()` check with valid choices is be too strict: All valid choices for an `AND` expression would contain the `AND` itself. However, sub-expressions should be allowed to also match only either side of the `AND`. Signed-off-by: Sebastian Schuberth <[email protected]>
- Loading branch information