aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pureJava/NestedSynchronized.java
blob: a9032912a049f912985c777c04df901ccbbdfbc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public class NestedSynchronized {
    static Object lockA = new Object();
    static Object lockB = new Object();

    static int bug() {
	synchronized (lockA) {
	    synchronized (lockB) {
		return 0;
	    }
	}
    }


    public static void main(String[] args) {
	bug();
    }
}