Skip to content

Commit fc342fb

Browse files
committed
copy should copy initSql and not use reference
1 parent f326508 commit fc342fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ebean-datasource-api/src/main/java/io/ebean/datasource/DataSourceConfig.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ public DataSourceConfig copy() {
143143
copy.clientInfo = new Properties();
144144
copy.clientInfo.putAll(clientInfo);
145145
}
146-
copy.initSql = initSql;
146+
if (initSql != null) {
147+
copy.initSql = new ArrayList<>(initSql);
148+
}
147149
copy.alert = alert;
148150
copy.listener = listener;
149151
copy.enforceCleanClose = enforceCleanClose;

0 commit comments

Comments
 (0)