Skip to content

Commit 480a4fd

Browse files
author
lucaijun
committed
AJ-559: fix connection pool without userId or password
1 parent 6105244 commit 480a4fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/xxdb/SimpleDBConnectionPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ protected class SimpleDBConnectionPoolImpl {
100100
}
101101
poolEntryArrayList.add(poolEntry);
102102
}
103+
poolEntries = new CopyOnWriteArrayList<>(poolEntryArrayList);
103104
if (userId.isEmpty() || password.isEmpty())
104105
log.warn("Create connection pool successfully without log in.");
105106
else
106107
log.info("Create connection pool successfully with log in.");
107-
poolEntries = new CopyOnWriteArrayList<>(poolEntryArrayList);
108108
} catch (Exception e) {
109109
log.error("Create connection pool failure, because " + e.getMessage());
110110
throw new RuntimeException(e);

0 commit comments

Comments
 (0)