Source:
public void configurationUpdateCallback(Map<String, String> properties) { logger.entry("configurationUpdateCallback"); if (properties != null && !properties.isEmpty()) { propertyMap = properties; logger.debug("Configuration values: {}", properties); String oldValue = hostname; hostname = properties.get(ConfigurationManager.HOST); logConfigurationValue(ConfigurationManager.HOST, oldValue, hostname); String portString = properties.get(ConfigurationManager.PORT); try { if (portString != null && !portString.isEmpty()) { port = Integer.parseInt(portString); } else { port = null; } logConfigurationValue(ConfigurationManager.PORT, oldValue, port); } catch (NumberFormatException e) { logger.warn("Error Updating Configuration value for '" + ConfigurationManager.PORT + "', not a valid Integer [" + portString + "] reverting back to old value [" + port + "]"); } oldValue = protocol; protocol = properties.get(ConfigurationManager.PROTOCOL); logConfigurationValue(ConfigurationManager.PROTOCOL, oldValue, protocol); if (protocol != null) { int index = protocol.indexOf(':'); schemeFromProtocol = index > -1 ? protocol.substring(0, index) : protocol; } else { schemeFromProtocol = null; } oldValue = siteName; siteName = properties.get(ConfigurationManager.SITE_NAME); logConfigurationValue(ConfigurationManager.SITE_NAME, oldValue, siteName); oldValue = version; version = properties.get(ConfigurationManager.VERSION); logConfigurationValue(ConfigurationManager.VERSION, oldValue, version); oldValue = organization; organization = properties.get(ConfigurationManager.ORGANIZATION); logConfigurationValue(ConfigurationManager.ORGANIZATION, oldValue, organization); oldValue = contactInfo; contactInfo = properties.get(ConfigurationManager.CONTACT); logConfigurationValue(ConfigurationManager.CONTACT, oldValue, contactInfo); } else { propertyMap.clear(); hostname = null; port = null; protocol = null; schemeFromProtocol = null; siteName = null; version = null; organization = null; contactInfo = null; logger.debug("Platform Configuration Properties are NULL or empty, setting all values to null"); } logger.exit(); }

Target:
public void configurationUpdateCallback(Map<String, String> properties) { logger.entry("configurationUpdateCallback"); if (properties != null && !properties.isEmpty()) { propertyMap = properties; logger.debug("Configuration values: {}", properties); String oldValue = hostname; hostname = properties.get(ConfigurationManager.HOST); logConfigurationValue(ConfigurationManager.HOST, oldValue, hostname); String portString = properties.get(ConfigurationManager.PORT); try { if (portString != null && !portString.isEmpty()) { port = Integer.parseInt(portString); } else { port = null; } logConfigurationValue(ConfigurationManager.PORT, oldValue, port); } catch (NumberFormatException e) { logger.warn( "Error Updating Configuration value for '{}', not a valid Integer reverting back to old value [{}]", new Object[] {ConfigurationManager.PORT, portString, port}); } oldValue = protocol; protocol = properties.get(ConfigurationManager.PROTOCOL); logConfigurationValue(ConfigurationManager.PROTOCOL, oldValue, protocol); if (protocol != null) { int index = protocol.indexOf(':'); schemeFromProtocol = index > -1 ? protocol.substring(0, index) : protocol; } else { schemeFromProtocol = null; } oldValue = siteName; siteName = properties.get(ConfigurationManager.SITE_NAME); logConfigurationValue(ConfigurationManager.SITE_NAME, oldValue, siteName); oldValue = version; version = properties.get(ConfigurationManager.VERSION); logConfigurationValue(ConfigurationManager.VERSION, oldValue, version); oldValue = organization; organization = properties.get(ConfigurationManager.ORGANIZATION); logConfigurationValue(ConfigurationManager.ORGANIZATION, oldValue, organization); oldValue = contactInfo; contactInfo = properties.get(ConfigurationManager.CONTACT); logConfigurationValue(ConfigurationManager.CONTACT, oldValue, contactInfo); } else { propertyMap.clear(); hostname = null; port = null; protocol = null; schemeFromProtocol = null; siteName = null; version = null; organization = null; contactInfo = null; logger.debug("Platform Configuration Properties are NULL or empty, setting all values to null"); } logger.exit(); }