Files
openide/java/java-impl/resources/inspectionDescriptions/AtomicFieldUpdaterIssues.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

26 lines
1009 B
HTML

<html>
<body>
Reports issues with <code>AtomicLongFieldUpdater</code>,
<code>AtomicIntegerFieldUpdater</code>, or <code>AtomicReferenceFieldUpdater</code> fields (the <code>java.util.concurrent.atomic</code> package).
<p>The reported issues are identical to the runtime problems that can happen with atomic field updaters:
specified field not found, specified field not accessible, specified field has a wrong type, and so on.</p>
<p><b>Examples:</b></p>
<ul>
<li><pre><code>
class A {
private static volatile int value = 0;
private static final AtomicIntegerFieldUpdater updater =
AtomicIntegerFieldUpdater.newUpdater((A.class), "value"); // warning: Field 'value' has 'static' modifier
}
</code></pre></li>
<li><pre><code>
class B {
private static final AtomicIntegerFieldUpdater updater =
AtomicIntegerFieldUpdater.newUpdater(B.class, "value"); // warning: No field named 'value' found in class 'B'
}
</code></pre></li>
</ul>
<!-- tooltip end -->
<p>
</body>
</html>