@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved") private Map<ConfigurationKey, Object> readObsoleteFileProperties(Set<URL> files, Map<String, ConfigurationKey> nameToKeyMap) { if (files.isEmpty()) { return Collections.emptyMap(); } Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files) { ConfigurationLogger.LOG.readingPropertiesFile(file); Properties fileProperties = loadProperties(file); for (String name : fileProperties.stringPropertyNames()) { ConfigurationKey key = nameToKeyMap.get(name); if (key != null) { processKeyValue(found, key, fileProperties.getProperty(name)); } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(name + " in " + fileProperties); } } } return found; }
@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved") private Map<ConfigurationKey, Object> readObsoleteFileProperties(Set<URL> files, Map<String, ConfigurationKey> nameToKeyMap) { if (files.isEmpty()) { return Collections.emptyMap(); } Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files) { ConfigurationLogger.LOG.readingPropertiesFile(file); Properties fileProperties = loadProperties(file); for (String name : fileProperties.stringPropertyNames()) { ConfigurationKey key = nameToKeyMap.get(name); if (key != null) { processKeyValue(found, key, fileProperties.getProperty(name)); } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(name + " in " + fileProperties); } } } return found; }
@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved") private Map<ConfigurationKey, Object> readObsoleteFileProperties(Set<URL> files, Map<String, ConfigurationKey> nameToKeyMap) { if (files.isEmpty()) { return Collections.emptyMap(); } Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files) { ConfigurationLogger.LOG.readingPropertiesFile(file); Properties fileProperties = loadProperties(file); for (String name : fileProperties.stringPropertyNames()) { ConfigurationKey key = nameToKeyMap.get(name); if (key != null) { processKeyValue(found, key, fileProperties.getProperty(name)); } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(name + " in " + fileProperties); } } } return found; }
@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved") private Map<ConfigurationKey, Object> readObsoleteFileProperties(Set<URL> files, Map<String, ConfigurationKey> nameToKeyMap) { if (files.isEmpty()) { return Collections.emptyMap(); } Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files) { ConfigurationLogger.LOG.readingPropertiesFile(file); Properties fileProperties = loadProperties(file); for (String name : fileProperties.stringPropertyNames()) { ConfigurationKey key = nameToKeyMap.get(name); if (key != null) { processKeyValue(found, key, fileProperties.getProperty(name)); } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(name + " in " + fileProperties); } } } return found; }
@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved") private Map<ConfigurationKey, Object> readObsoleteFileProperties(Set<URL> files, Map<String, ConfigurationKey> nameToKeyMap) { if (files.isEmpty()) { return Collections.emptyMap(); } Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files) { ConfigurationLogger.LOG.readingPropertiesFile(file); Properties fileProperties = loadProperties(file); for (String name : fileProperties.stringPropertyNames()) { ConfigurationKey key = nameToKeyMap.get(name); if (key != null) { processKeyValue(found, key, fileProperties.getProperty(name)); } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(name + " in " + fileProperties); } } } return found; }
@SuppressFBWarnings(value = "DMI_COLLECTION_OF_URLS", justification = "Only local URLs involved") private Map<ConfigurationKey, Object> readObsoleteFileProperties(Set<URL> files, Map<String, ConfigurationKey> nameToKeyMap) { if (files.isEmpty()) { return Collections.emptyMap(); } Map<ConfigurationKey, Object> found = new EnumMap<ConfigurationKey, Object>(ConfigurationKey.class); for (URL file : files) { ConfigurationLogger.LOG.readingPropertiesFile(file); Properties fileProperties = loadProperties(file); for (String name : fileProperties.stringPropertyNames()) { ConfigurationKey key = nameToKeyMap.get(name); if (key != null) { processKeyValue(found, key, fileProperties.getProperty(name)); } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(name + " in " + fileProperties); } } } return found; }
/** * Process the given string key and value. First try to convert the <code>stringKey</code> - unsupported keys are ignored. Then delegate to * {@link #processKeyValue(Map, ConfigurationKey, Object)}. * * @param properties * @param stringKey * @param value */ private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value) { ConfigurationKey key = ConfigurationKey.fromString(stringKey); if (key != null) { processKeyValue(properties, key, value); } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(stringKey); } }
private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value, boolean integratorSource) { ConfigurationKey key = ConfigurationKey.fromString(stringKey); if (key != null) { if (key.isIntegratorOnly() && !integratorSource) { ConfigurationLogger.LOG.cannotSetIntegratorOnlyConfigurationProperty(stringKey, value); } else { processKeyValue(properties, key, value); } } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(stringKey); } }
private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value, boolean integratorSource) { ConfigurationKey key = ConfigurationKey.fromString(stringKey); if (key != null) { if (key.isIntegratorOnly() && !integratorSource) { ConfigurationLogger.LOG.cannotSetIntegratorOnlyConfigurationProperty(stringKey, value); } else { processKeyValue(properties, key, value); } } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(stringKey); } }
private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value, boolean integratorSource) { ConfigurationKey key = ConfigurationKey.fromString(stringKey); if (key != null) { if (key.isIntegratorOnly() && !integratorSource) { ConfigurationLogger.LOG.cannotSetIntegratorOnlyConfigurationProperty(stringKey, value); } else { processKeyValue(properties, key, value); } } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(stringKey); } }
private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value, boolean integratorSource) { ConfigurationKey key = ConfigurationKey.fromString(stringKey); if (key != null) { if (key.isIntegratorOnly() && !integratorSource) { ConfigurationLogger.LOG.cannotSetIntegratorOnlyConfigurationProperty(stringKey, value); } else { processKeyValue(properties, key, value); } } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(stringKey); } }
private void processKeyValue(Map<ConfigurationKey, Object> properties, String stringKey, Object value, boolean integratorSource) { ConfigurationKey key = ConfigurationKey.fromString(stringKey); if (key != null) { if (key.isIntegratorOnly() && !integratorSource) { ConfigurationLogger.LOG.cannotSetIntegratorOnlyConfigurationProperty(stringKey, value); } else { processKeyValue(properties, key, value); } } else { ConfigurationLogger.LOG.unsupportedConfigurationKeyFound(stringKey); } }