Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid NPE during Thing update (#758)
Compare equality using Objects.equals(Object, Object) which is null-safe. Possible fix for #755. Also mentioned here: https://community.openhab.org/t/item-update-results-in-exception-occurred-while-calling-thing-updated-at-thinghandler/34526/2 It’s very hard to add a unit test because the updateNodeProperties() method is private and 144 lines long. Would patches to split this function out be acceptable? An alternative fix would be to simply do: ```java update = config.equals(originalConfig); ``` because `org.eclipse.smarthome.config.core.Configuration` implements the `equals` method, but then we wouldn’t be able to have the debug messages showing what changed. Having said that, you’ll only see the first changed key logged anyway because of the `break` statement. Signed-off-by: Jon Evans <[email protected]> (github: evansj)
- Loading branch information