File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
src/main/java/io/ebean/datasource/pool Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -60,19 +60,14 @@ PooledConnection remove() {
6060 void closeAll (boolean logErrors ) {
6161
6262 // create a temporary list
63- List <PooledConnection > tempList = new ArrayList <>(freeBuffer .size ());
64-
65- // add all the connections into it
66- tempList .addAll (freeBuffer );
63+ List <PooledConnection > tempList = new ArrayList <>(freeBuffer );
6764
6865 // clear the buffer (in case it takes some time to close these connections).
6966 freeBuffer .clear ();
7067
7168 logger .debug ("... closing all {} connections from the free list with logErrors: {}" , tempList .size (), logErrors );
72- for (int i = 0 ; i < tempList .size (); i ++) {
73- PooledConnection pooledConnection = tempList .get (i );
74- logger .debug ("... closing {} of {} connections from the free list" , i , tempList .size ());
75- pooledConnection .closeConnectionFully (logErrors );
69+ for (PooledConnection connection : tempList ) {
70+ connection .closeConnectionFully (logErrors );
7671 }
7772 }
7873
You can’t perform that action at this time.
0 commit comments