mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 04:21:24 +07:00
Java: Take into account writes to the field done via AtomicFieldUpdater (IDEA-152262)
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
|
||||
|
||||
class Atomics {
|
||||
private volatile String str;
|
||||
|
||||
public void set(String s) {
|
||||
AtomicReferenceFieldUpdater<Atomics, String> updater = AtomicReferenceFieldUpdater.newUpdater(Atomics.class, String.class, "str");
|
||||
updater.set(this, s);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user