Source:
protected void receiveUpdate(ItemStateEvent updateEvent) { String itemName = updateEvent.getItemName(); final State newState = updateEvent.getItemState(); Set<ChannelUID> boundChannels = this.itemChannelLinkRegistry.getBoundChannels(itemName); for (final ChannelUID channelUID : boundChannels) { if (!channelUID.toString().equals(updateEvent.getSource())) { Thing thing = getThing(channelUID.getThingUID()); if (thing != null) { final ThingHandler handler = thing.getHandler(); if (handler != null) { if (isInitialized(thing)) { logger.debug("Delegating update '{}' for item '{}' to handler for channel '{}'", newState, itemName, channelUID); try { SafeMethodCaller.call(new SafeMethodCaller.ActionWithException<Void>() { @Override public Void call() throws Exception { handler.handleUpdate(channelUID, newState); return null; } }); } catch (TimeoutException ex) { logger.warn("Handler for thing takes more than {}ms for processing event", handler.getThing().getUID(), SafeMethodCaller.DEFAULT_TIMEOUT); } catch (Exception ex) { logger.error("Exception occured while calling handler: " + ex.getMessage(), ex); } } else { logger.warn("Cannot delegate update '{}' for item '{}' to handler for channel '{}', " + "because thing is not initialized (must be in status ONLINE or OFFLINE).", newState, itemName, channelUID); } } else { logger.warn("Cannot delegate update '{}' for item '{}' to handler for channel '{}', " + "because no handler is assigned. Maybe the binding is not installed or not " + "propertly initialized.", newState, itemName, channelUID); } } else { logger.warn( "Cannot delegate update '{}' for item '{}' to handler for channel '{}', " + "because no thing with the UID '{}' could be found.", newState, itemName, channelUID, channelUID.getThingUID()); } } } }

Target:
protected void receiveUpdate(ItemStateEvent updateEvent) { String itemName = updateEvent.getItemName(); final State newState = updateEvent.getItemState(); Set<ChannelUID> boundChannels = this.itemChannelLinkRegistry.getBoundChannels(itemName); for (final ChannelUID channelUID : boundChannels) { if (!channelUID.toString().equals(updateEvent.getSource())) { Thing thing = getThing(channelUID.getThingUID()); if (thing != null) { final ThingHandler handler = thing.getHandler(); if (handler != null) { if (isInitialized(thing)) { logger.debug("Delegating update '{}' for item '{}' to handler for channel '{}'", newState, itemName, channelUID); try { SafeMethodCaller.call(new SafeMethodCaller.ActionWithException<Void>() { @Override public Void call() throws Exception { handler.handleUpdate(channelUID, newState); return null; } }); } catch (TimeoutException ex) { logger.warn("Handler for thing takes more than {}ms for processing event", handler.getThing().getUID(), SafeMethodCaller.DEFAULT_TIMEOUT); } catch (Exception ex) { logger.error("Exception occured while calling handler: " + ex.getMessage(), ex); } } else { logger.info("Not delegating update '{}' for item '{}' to handler for channel '{}', " + "because thing is not initialized (must be in status ONLINE or OFFLINE).", newState, itemName, channelUID); } } else { logger.warn("Cannot delegate update '{}' for item '{}' to handler for channel '{}', " + "because no handler is assigned. Maybe the binding is not installed or not " + "propertly initialized.", newState, itemName, channelUID); } } else { logger.warn( "Cannot delegate update '{}' for item '{}' to handler for channel '{}', " + "because no thing with the UID '{}' could be found.", newState, itemName, channelUID, channelUID.getThingUID()); } } } }