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

Null handling in divide #489

Closed
wants to merge 2 commits into from
Closed

Conversation

clinique
Copy link
Contributor

This is my proposal to address what I think is an issue #488

Solves issue smarthomej#488

Signed-off-by: clinique <[email protected]>
Signed-off-by: clinique <[email protected]>
logger.warn("Input value '{}' could not be converted to a valid number", valueString);
throw new TransformationException("Math Transformation can only be used with numeric inputs");

if("NULL".equals(valueString) || "NULL".equals(sourceString)) {
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it make sense to check UNDEF, too?

Copy link
Member

Choose a reason for hiding this comment

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

@clinique Can you comment here? I would like to do a release in the next days due to #490.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't it make sense to check UNDEF, too?

You're correct, I thought of it but I only faced the error with NULL, never UNDEF, so thought : if not broken, don't fix it :)

@J-N-K J-N-K added the enhancement New feature or request label Jun 2, 2023
@J-N-K
Copy link
Member

J-N-K commented Jun 11, 2023

I added another version to get it into 3.2.17

@J-N-K J-N-K closed this Jun 11, 2023
@clinique clinique deleted the NULL_handling branch June 11, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants