Skip to content

Commit

Permalink
Fixes #1137 support changing user/password at runtime for DriverDataS…
Browse files Browse the repository at this point in the history
…ource-wrapped driver connections.
  • Loading branch information
brettwooldridge committed May 14, 2018
1 parent 851e2d4 commit 8921bb0
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 8921bb0

Please sign in to comment.