Open kaikreuzer opened 8 years ago
@sbussweiler Could you have a look at this? Am I missing something regarding the base implementation?
@sbussweiler Ping :-)
We will clarify the impact offline ;-)
As we discussed, BaseThingHandler.updateConfiguration() should also call callback.configurationUpdated(). I will update the implementation and the documentation.
What if a binding programmer wants to override handleConfigurationUpdate(), but mainly use the suggested code of BaseThingHandler? The variable callback is private. What should an overriding method do to fire all necessary notifications?
The example code for handleConfigurationUpdate does a
This is imho not the way that implementations should do it (see my https://github.com/openhab/openhab2-addons/pull/650#discussion_r52759852). If they have no better logic, they should simply use the super implementation in BaseThingHandler.
Within BaseThingHandler.updateConfiguration, callback.thingUpdated() is called - I wonder why this isn't instead only calling callback.configurationUpdated()?