eclipse-archived / smarthome

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

initialize() is called even though not all required config params are set #3527

Closed kaikreuzer closed 7 years ago

kaikreuzer commented 7 years ago

I came across this bug while testing the Tradfri binding:

Its bridge defines an host and a token as required configuration parameters. The discovery naturally only fills the host, but leaves the token null. Nonetheless, the ThingManager calls initialize() on the bridge handler.

Here's the log:

2017-05-26 23:21:21.618 [INFO ] [marthome.event.ThingAddedEvent:43   ] - Thing 'ikeatradfri:gateway:gwb072bf27b71d' has been added.
2017-05-26 23:21:21.618 [DEBUG] [.c.thing.internal.ThingManager:461  ] - Thing 'ikeatradfri:gateway:gwb072bf27b71d' is tracked by ThingManager.
2017-05-26 23:21:21.619 [DEBUG] [.c.thing.internal.ThingManager:603  ] - Calling 'IkeaTradfriHandlerFactory.registerHandler()' for thing 'ikeatradfri:gateway:gwb072bf27b71d'.
2017-05-26 23:21:21.655 [DEBUG] [.core.common.ThreadPoolManager:115  ] - Created scheduled thread pool 'thingHandler' of size 3
2017-05-26 23:21:21.666 [INFO ] [ome.event.ThingStatusInfoEvent:43   ] - 'ikeatradfri:gateway:gwb072bf27b71d' updated: INITIALIZING
2017-05-26 23:21:21.666 [DEBUG] [.c.thing.internal.ThingManager:728  ] - Calling initialize handler for thing 'ikeatradfri:gateway:gwb072bf27b71d' at 'org.openhab.binding.ikeatradfri.handler.IkeaTradfriGatewayHandler@131a549d'.
2017-05-26 23:21:21.667 [INFO ] [nt.ThingStatusInfoChangedEvent:43   ] - 'ikeatradfri:gateway:gwb072bf27b71d' changed from UNINITIALIZED to INITIALIZING
sjsf commented 7 years ago

Hm, that doesn't really make sense... I cannot reproduce it here. Therefore I created #3529 in order to better understand what's going on.