in src/main/java/software/aws/neptune/jdbc/utilities/ConnectionProperties.java [461:500]
private void resolveProperties(final Properties inputProperties) throws SQLException {
// List of input properties keys used to keep track of unresolved properties.
final Set<Object> inputPropertiesKeys = new HashSet<>(inputProperties.keySet());
for (final String mapKey : PROPERTY_CONVERTER_MAP.keySet()) {
for (final Map.Entry<Object, Object> entry : inputProperties.entrySet()) {
final String key = entry.getKey().toString();
final String value = entry.getValue().toString();
// Find matching property by comparing keys (case-insensitive)
if (key.equalsIgnoreCase(mapKey)) {
// Insert resolved property into the map.
put(mapKey, PROPERTY_CONVERTER_MAP.get(mapKey).convert(key, value));
// Remove key for the resolved property.
inputPropertiesKeys.remove(key);
break;
}
}
}
setDefaults();
// Go through properties in the supportedProperties
final Set<Object> inputPropertiesKeyCopy = new HashSet<>(inputPropertiesKeys);
for (final Object inputPropertiesKey : inputPropertiesKeyCopy) {
if (isSupportedProperty(inputPropertiesKey.toString())) {
put(inputPropertiesKey, inputProperties.get(inputPropertiesKey));
inputPropertiesKeys.remove(inputPropertiesKey);
}
}
// If there are any unresolved properties left, log a warning.
if (!inputPropertiesKeys.isEmpty()) {
for (final Object property : inputPropertiesKeys) {
LOGGER.warn(
String.format("Property '%s' is not supported by the connection string.", property.toString()));
}
}
validateProperties();
}