mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-10-03 09:13:27 +00:00
Make toString synchronized. Closes #621
This commit is contained in:
1 parent
f28ed7b46e
commit
a3324a122c
1 file changed
+1
-1
@@ -55,7 +55,7 @@ public abstract class ObjectPool<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
public synchronized String toString() {
|
||||
return String.format("Pool available=%d inUse=%d", available.size(), inUse.size());
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user