We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 71e8688 commit 851e2d4Copy full SHA for 851e2d4
1 file changed
src/main/java/com/zaxxer/hikari/util/DriverDataSource.java
@@ -120,9 +120,18 @@ public Connection getConnection() throws SQLException
120
}
121
122
@Override
123
- public Connection getConnection(String username, String password) throws SQLException
+ public Connection getConnection(final String username, final String password) throws SQLException
124
{
125
- return getConnection();
+ final Properties cloned = (Properties) driverProperties.clone();
126
+ if (username != null) {
127
+ cloned.put("user", username);
128
+ cloned.put("username", username);
129
+ }
130
+ if (password != null) {
131
+ cloned.put("password", password);
132
133
+
134
+ return driver.connect(jdbcUrl, cloned);
135
136
137
0 commit comments