mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
11 lines
364 B
Java
11 lines
364 B
Java
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
|
|
|
|
class Atomics {
|
|
private volatile int <warning descr="Private field 'num' is never assigned">num</warning>;
|
|
private static final AtomicIntegerFieldUpdater<Atomics> updater =
|
|
AtomicIntegerFieldUpdater.newUpdater(Atomics.class, "num");
|
|
|
|
public int getInt() {
|
|
return updater.get(this);
|
|
}
|
|
} |