Files
openide/java/java-impl/resources/inspectionDescriptions/NonFinalFieldInImmutable.html
2025-02-05 04:43:28 +00:00

24 lines
799 B
HTML

<html>
<body>
Reports any non-final field in a class with the <code>@Immutable</code> annotation.
This violates the contract of the <code>@Immutable</code> annotation.
<p>Example:</p>
<pre><code>
import javax.annotation.concurrent.Immutable;
@Immutable
class Foo {
String bar = "foo";
}
</code></pre>
<!-- tooltip end -->
<p>Supported <code>@GuardedBy</code> annotations are:</p>
<ul>
<li><code>net.jcip.annotations.GuardedBy</code></li>
<li><code>javax.annotation.concurrent.GuardedBy</code></li>
<li><code>org.apache.http.annotation.GuardedBy</code></li>
<li><code>com.android.annotations.concurrency.GuardedBy</code></li>
<li><code>androidx.annotation.GuardedBy</code></li>
<li><code>com.google.errorprone.annotations.concurrent.GuardedBy</code></li>
</ul>
</body>
</html>