Are there any unclear side effects to throwing an exception from within a synchronized clause? What happens to the lock?
private void doSomething() throws Exception {...}
synchronized (lock) {
doSomething();
}
I see no side-effect.
The lock is guaranteed to be terminated in all cases, and an exception is no exception (pun intended).