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

[persistence] Handle null value for unit field of filters #3716

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

florian-h05
Copy link
Contributor

Setting up a treshold filter with the UI, it did not work because the unit field was blank. I got an NPE from PersistenceTresholdFilter, and the PersistenceIncludeFilter would also throw a NPE in that case. For PersistenceTimeFilter, defaulting to "s" is just cosmetic.

@J-N-K Picks-up PR #3681 and should be merged for the 4.0 release, because the UI does not prevent the unit field from being null.

Setting up a treshold filter with the UI, it did not work because the unit field was blank.
I got an NPE from PersistenceTresholdFilter, and the PersistenceIncludeFilter would also throw a NPE in that case.
For PersistenceTimeFilter, defaulting to "s" is just cosmetic.

Picks-up PR #3681 and should be merged for the 4.0 release, because the UI does not prevent the unit field from being null.

Signed-off-by: Florian Hotze <[email protected]>
@florian-h05 florian-h05 requested a review from a team as a code owner July 20, 2023 14:31
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

LGTM

@J-N-K J-N-K added this to the 4.0 milestone Jul 20, 2023
@J-N-K J-N-K added the bug An unexpected problem or unintended behavior of the Core label Jul 20, 2023
@J-N-K J-N-K merged commit 62a8355 into openhab:main Jul 20, 2023
2 checks passed
@florian-h05 florian-h05 deleted the persistence-filter-unit branch July 20, 2023 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants