Skip to content

Commit 1506293

Browse files
committed
fixes #58 UnpooledDataSource does not use custom driver properties when acquiring connection. I couldn't find a way to write a test for this.
1 parent f3d4f12 commit 1506293

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/org/apache/ibatis/datasource/unpooled/UnpooledDataSource.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,10 @@ public void setDefaultTransactionIsolationLevel(Integer defaultTransactionIsolat
173173
}
174174

175175
private Connection doGetConnection(String username, String password) throws SQLException {
176-
Properties props = new Properties(driverProperties);
176+
Properties props = new Properties();
177+
if (driverProperties != null) {
178+
props.putAll(driverProperties);
179+
}
177180
if (username != null) {
178181
props.setProperty("user", username);
179182
}

0 commit comments

Comments
 (0)