If you see the code in the SynchronizedCollection . Methods delegate the call to the base collection, but adding a synchronized block on top of the call is something like this
public int size() { synchronized (mutex) {return c.size();} }
The size implementation looks like this: HashTable class
public synchronized int size() { return count; }
So, if you go to HashTable before the SynchronizedCollection , the thread accessing the SynchronizedCollection will have to take locks at 2 levels once for the synchronized block, and the other for the synchronized method. If there are other threads directly linked to the HashTable, they can block threads using the SynchronizedCollection , even if the thread got a lock on the SynchronizedCollection .
source share