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

20 lines
856 B
HTML

<html>
<body>
Reports objects that are modified but never queried.
<p>The inspection relies on the method mutation contract, which could be inferred
or pre-annotated for some library methods. This inspection does not report collections, maps, and string builders, as these types
are reported by other more precise inspections.
</p>
<p>Example:</p>
<pre><code>
AtomicReference&lt;String&gt; ref = new AtomicReference&lt;&gt;();
ref.set("hello"); // ref is never used again
</code></pre>
<!-- tooltip end -->
<p>
Use the <b>Ignore impure constructors</b> option to control whether to process objects created by constructor or method whose purity is not known.
Unchecking the option may introduce some false-positives if the object reference is intentionally leaked during the construction.
</p>
<b><small>New in 2021.2</small></b>
</body>
</html>