blob: f178aa4ee7dd9a11a24f2005f173a314fd6462fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
class SynchronizedPlain1 {
@java.lang.SuppressWarnings("all")
private final java.lang.Object $lock = new java.lang.Object[0];
void test() {
synchronized (this.$lock) {
System.out.println("one");
}
}
void test2() {
synchronized (this.$lock) {
System.out.println("two");
}
}
}
class SynchronizedPlain2 {
@java.lang.SuppressWarnings("all")
private static final java.lang.Object $LOCK = new java.lang.Object[0];
static void test() {
synchronized (SynchronizedPlain2.$LOCK) {
System.out.println("three");
}
}
static void test2() {
synchronized (SynchronizedPlain2.$LOCK) {
System.out.println("four");
}
}
}
|