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

test: Test ObjectUtils::coerceToBoolean #8996

Merged

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented Mar 23, 2023

No description provided.

@sdelamo sdelamo requested a review from graemerocher March 23, 2023 16:45
true | 1L
true | new BigDecimal("0.1")
true | 1
false | -1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Apache Groovy a negative number evaluates to true. Not sure if we should change this to return true for negative numbers as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think the logic for numbers is questionable. We should return true as well

@graemerocher graemerocher merged commit ba3c5de into compile-time-expression-language Mar 24, 2023
@graemerocher graemerocher deleted the compile-time-expressions-imp1 branch March 24, 2023 15:53
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.

2 participants