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

Add a method to JexlASTHelper which checks for AND/OR nodes with a single child #1233

Closed
jwomeara opened this issue Jul 27, 2021 · 0 comments · Fixed by #1366
Closed

Add a method to JexlASTHelper which checks for AND/OR nodes with a single child #1233

jwomeara opened this issue Jul 27, 2021 · 0 comments · Fixed by #1366
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@jwomeara
Copy link
Collaborator

Once the method is added, we should add unit tests for each visitor to have some basic level of assurance that we are not intentionally doing this.

Additionally, we should come up with a paradigm where this check can be enabled on a visitor via configuration so that we can test this in production if we suspect the issue is occurring. We should do this for validateLineage as well.

@jwomeara jwomeara added bug Something isn't working enhancement New feature or request labels Jul 27, 2021
@jwomeara jwomeara changed the title Add a method to JexlASTHelper which checks for single child AND/OR nodes Add a method to JexlASTHelper which checks for AND/OR nodes with a single child Jul 27, 2021
@lbschanno lbschanno self-assigned this Dec 4, 2021
lbschanno added a commit that referenced this issue Dec 6, 2021
Add a method that will validate that a specified query tree does not
have any junction (AND/OR) nodes with less than 2 children.

Fixes #1233
hgklohr added a commit that referenced this issue Dec 22, 2021
…1366)

* Add method to JexlASTHelper to validate children of junction nodes

Add a method that will validate that a specified query tree does not
have any junction (AND/OR) nodes with less than 2 children.

Fixes #1233

* Add validateJunctionChildren(node) with default for failHard

Co-authored-by: hgklohr <hgklohr@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants