Skip to content

Commit a3324a1

Browse files
committed
Make toString synchronized. Closes iluwatar#621
1 parent f28ed7b commit a3324a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: object-pool/src/main/java/com/iluwatar/object/pool/ObjectPool.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public synchronized void checkIn(T instance) {
5555
}
5656

5757
@Override
58-
public String toString() {
58+
public synchronized String toString() {
5959
return String.format("Pool available=%d inUse=%d", available.size(), inUse.size());
6060
}
6161
}

0 commit comments

Comments
 (0)