eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
862 stars 787 forks source link

[OneWire] Minor Updates and fixes #6809

Closed J-N-K closed 5 years ago

J-N-K commented 5 years ago

For easier review I have left the individual commits in place.

J-N-K commented 5 years ago

@kaikreuzer After thinking about my first changes: Is the root cause a framework issue? It seems that after updating the thing configuration the framework disposes the handler, calls initialize() again but keeps the thing status. I would expect it to go back to INITIALIZING.

kaikreuzer commented 5 years ago

No, changing the configuration does not necessarily dispose the handler. This is only done in the default implementation in BaseThingHandler, but this effectively means that it is the handler that calls dispose and not the framework.

J-N-K commented 5 years ago

Ok, but the question remains: would you expect the thing to have INITIALIZING state when initialize() is called? Then the BaseThingHandler should update the state when disposing or initializing.

kaikreuzer commented 5 years ago

INITIALIZING is set by the framework. If the framework is not involved (as explained above) I do not expect this status when the handler itself calls initialize. Note that the handler MUST NOT set the status to INITIALIZING, this is only allowed for the framework.

J-N-K commented 5 years ago

Ok. Thank you.