-
-
Notifications
You must be signed in to change notification settings - Fork 429
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
Fix change detection for textual things #4076
Conversation
9d99686
to
8a6ed12
Compare
@jimtng : conflicts is mentioned It would be cool to have a review of your PR. I tale a look but I am not enough aware of the code you updated to confirm that your changes are valid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Can you rebase? |
There were two problems: - The old things weren't removed, resulting in accumulation of duplicate things and comparing the new one against the old one resulting in erroneous update - Numeric values (usually entered as integer) in a newly loaded Channel Configuration properties are stored as BigDecimal with Scale 0, but subsequent normalization changed it to scale 1. This made equals() return false when it shouldn't. This leads to calling notifyListenersAboutUpdatedElement unnecessarily. Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
rebased |
Integration tests failed in org.openhab.core.automation.tests: |
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
checks passed now |
Looks good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #3235
General Problem Description:
When a .things file contains multiple Things and only one thing was changed, update notifications will be sent for all the things inside the file.
It should only send an update notification for the one thing that changed, and not the other things.
This is caused by two issues: