aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pureJava/NestedSynchronized.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pureJava/NestedSynchronized.java')
-rw-r--r--tests/pureJava/NestedSynchronized.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/pureJava/NestedSynchronized.java b/tests/pureJava/NestedSynchronized.java
new file mode 100644
index 000000000..a9032912a
--- /dev/null
+++ b/tests/pureJava/NestedSynchronized.java
@@ -0,0 +1,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();
+ }
+}
+