Skip to content

Commit 16348a3

Browse files
committed
#23 - Refactor tidy
1 parent cd27a17 commit 16348a3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/io/ebean/datasource/pool/PooledConnectionQueue.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,7 @@ void ensureMinimumConnections() throws SQLException {
224224
int add = minSize - totalConnections();
225225
if (add > 0) {
226226
for (int i = 0; i < add; i++) {
227-
PooledConnection c = pool.createConnectionForQueue(connectionId++);
228-
freeList.add(c);
227+
freeList.add(pool.createConnectionForQueue(connectionId++));
229228
}
230229
notEmpty.signal();
231230
}
@@ -409,7 +408,10 @@ public void reset(long leakTimeMinutes) {
409408
closeFreeConnections(false);
410409
closeBusyConnections(leakTimeMinutes);
411410

412-
logger.info("Busy Connections:\n" + getBusyConnectionInformation());
411+
String busyInfo = getBusyConnectionInformation();
412+
if (!busyInfo.isEmpty()) {
413+
logger.info("Busy Connections:\n" + busyInfo);
414+
}
413415

414416
} finally {
415417
lock.unlock();

0 commit comments

Comments
 (0)