mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-03 09:13:36 +00:00
Also split up the SynchronizedName test into separate cases for each expected failure mode.
20 lines
357 B
Java
20 lines
357 B
Java
class SynchronizedName {
|
|
private Object read = new Object();
|
|
private static Object READ = new Object();
|
|
|
|
void test1() {
|
|
synchronized (this.read) {
|
|
System.out.println("one");
|
|
}
|
|
}
|
|
void test4() {
|
|
synchronized (this.READ) {
|
|
System.out.println("four");
|
|
}
|
|
}
|
|
void test5() {
|
|
synchronized (this.read) {
|
|
System.out.println("five");
|
|
}
|
|
}
|
|
} |