mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 08:31:07 +03:00
[FIX] initializeAtStart thread safety
This commit is contained in:
parent
c7f4d8ac49
commit
cc2bce4300
1 changed files with 3 additions and 3 deletions
|
@ -19,15 +19,15 @@ public class HikariSQLSourceConfig implements SQLSourceConfig {
|
|||
private boolean initializeAtStart;
|
||||
|
||||
public void init() {
|
||||
if (dataSource != null) {
|
||||
return;
|
||||
}
|
||||
if(initializeAtStart) {
|
||||
initializeConnection();
|
||||
}
|
||||
}
|
||||
|
||||
private void initializeConnection() {
|
||||
if (dataSource != null) {
|
||||
return;
|
||||
}
|
||||
HikariConfig config = new HikariConfig();
|
||||
consumeIfNotNull(config::setDataSourceClassName, dsClass);
|
||||
consumeIfNotNull(config::setDataSourceProperties, dsProps);
|
||||
|
|
Loading…
Reference in a new issue