mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-17 11:40:50 +07:00
21 lines
341 B
Java
21 lines
341 B
Java
class Bar {
|
|
private Object field;
|
|
private final Object lock = new Object();
|
|
|
|
public void main() {
|
|
synchronized (lock) {
|
|
if (field != null) {
|
|
return;
|
|
}
|
|
}
|
|
synchronized (lock) {
|
|
if (field != null) {
|
|
return;
|
|
}
|
|
if (field == null) {
|
|
System.out.println();
|
|
}
|
|
}
|
|
}
|
|
}
|