Source:
public void updated(Dictionary<String, ?> config) throws ConfigurationException { logger.debug("Denon binding updated"); if (config == null) { logger.warn("Denon binding has no configuration defined. Check the configuration file."); return; } Enumeration<String> keys = config.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); if (CONFIG_SERVICE_PID.equals(key)) { continue; } String[] parts = key.split("\\."); String value = ((String) config.get(key)).trim(); if (parts.length == 1) { String option = parts[0]; if (CONFIG_REFRESH.equals(option)) { refreshInterval = Integer.valueOf(value); } } else { String instance = parts[0]; DenonConnectionProperties connection = connections.get(instance); if (connection == null) { connection = new DenonConnectionProperties(); connection.setInstance(instance); connections.put(instance, connection); } String option = parts[1].trim(); if (CONFIG_HOST.equals(option)) { connection.setHost(value); } else if (CONFIG_UPDATE_TYPE.equals(option)) { connection.setTelnet(value.equals(CONFIG_UPDATE_TYPE_TELNET)); connection.setHttp(value.equals(CONFIG_UPDATE_TYPE_HTTP)); if (!value.equals(CONFIG_UPDATE_TYPE_TELNET) && !value.equals(CONFIG_UPDATE_TYPE_HTTP)) { logger.warn("Invalid connection type for instance {}, using default", value, instance); } } } } boolean isActiveBinding = false; for (Entry<String, DenonConnectionProperties> entry : connections.entrySet()) { DenonConnectionProperties connection = entry.getValue(); logger.debug("Denon receiver configured at {}", connection.getHost()); DenonConnector connector = new DenonConnector(connection, new DenonPropertyUpdatedCallback() { @Override public void updated(String instance, String property, State state) { processPropertyUpdated(instance, property, state); } }); connection.setConnector(connector); connector.connect(); if (connection.isHttp()) { isActiveBinding = true; } } setProperlyConfigured(isActiveBinding); }

Target:
public void updated(Dictionary<String, ?> config) throws ConfigurationException { logger.debug("Denon binding updated"); if (config == null) { return; } Enumeration<String> keys = config.keys(); while (keys.hasMoreElements()) { String key = keys.nextElement(); if (CONFIG_SERVICE_PID.equals(key)) { continue; } String[] parts = key.split("\\."); String value = Objects.toString(config.get(key), null); if (parts.length == 1) { String option = parts[0]; if (CONFIG_REFRESH.equals(option)) { refreshInterval = Integer.valueOf(value); } } else { String instance = parts[0]; DenonConnectionProperties connection = connections.get(instance); if (connection == null) { connection = new DenonConnectionProperties(); connection.setInstance(instance); connections.put(instance, connection); } String option = parts[1].trim(); if (CONFIG_HOST.equals(option)) { connection.setHost(value); } else if (CONFIG_UPDATE_TYPE.equals(option)) { connection.setTelnet(value.equals(CONFIG_UPDATE_TYPE_TELNET)); connection.setHttp(value.equals(CONFIG_UPDATE_TYPE_HTTP)); if (!value.equals(CONFIG_UPDATE_TYPE_TELNET) && !value.equals(CONFIG_UPDATE_TYPE_HTTP)) { logger.warn("Invalid connection type for instance {}, using default", value, instance); } } } } boolean isActiveBinding = false; for (Entry<String, DenonConnectionProperties> entry : connections.entrySet()) { DenonConnectionProperties connection = entry.getValue(); logger.debug("Denon receiver configured at {}", connection.getHost()); DenonConnector connector = new DenonConnector(connection, new DenonPropertyUpdatedCallback() { @Override public void updated(String instance, String property, State state) { processPropertyUpdated(instance, property, state); } }); connection.setConnector(connector); connector.connect(); if (connection.isHttp()) { isActiveBinding = true; } } setProperlyConfigured(isActiveBinding); }