in Java whenever we need to call wait/notify/notifyAll, we need to have access to object monitor (either through synchronized method or through synchronized block). So my q
Among all the non-buggy codes I've read and written, all the them use wait/notify in a bigger synchronization block involving read/write of other conditions
synchronized(lock)
update condition
lock.notify()
synchronized(lock)
while( condition not met)
lock.wait()
If wait/notify are themselves synchronized, no harm is done to all the correct codes (may a small performance penalty); it won't do any good either to all the correct codes.
However, it would have permitted and encouraged a lot more incorrect codes.