Skip to content

Commit 31f4b15

Browse files
authored
Merge pull request iluwatar#565 from kapinuss/patch-1
Update ObjectPool.java
2 parents cd54cf5 + 798aee4 commit 31f4b15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

object-pool/src/main/java/com/iluwatar/object/pool/ObjectPool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public abstract class ObjectPool<T> {
4040
* Checkout object from pool
4141
*/
4242
public synchronized T checkOut() {
43-
if (available.size() <= 0) {
43+
if (available.isEmpty()) {
4444
available.add(create());
4545
}
4646
T instance = available.iterator().next();

0 commit comments

Comments
 (0)