-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Open
Labels
Description
It would be helpful to have a method to convert a Map<String, String> to Properties to use when interacting with APIs that require it. For example, the JDBC Driver.connect() method takes a Properties.
public static Properties toProperties(Map<String, String> map) {
Properties properties = new Properties();
for (Map.Entry<String, String> entry : map.entrySet()) {
properties.setProperty(entry.getKey(), entry.getValue());
}
return properties;
}Reactions are currently unavailable