Skip to content

Commit

Permalink
Fixes brettwooldridge#1137 support changing user/password at runtime …
Browse files Browse the repository at this point in the history
…for DriverDataSource-wrapped driver connections.
  • Loading branch information
brettwooldridge authored and kollstrom committed Feb 4, 2021
1 parent aaab6af commit 42e202c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/zaxxer/hikari/util/DriverDataSource.java
Expand Up @@ -125,7 +125,9 @@ public Connection getConnection(final String username, final String password) th
final Properties cloned = (Properties) driverProperties.clone();
if (username != null) {
cloned.put("user", username);
cloned.put("username", username);
if (cloned.containsKey("username")) {
cloned.put("username", username);
}
}
if (password != null) {
cloned.put("password", password);
Expand Down

0 comments on commit 42e202c

Please sign in to comment.