mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Improve inspection description example
GitOrigin-RevId: f03b4d9082aecc9fe87f1a1e3a9ec8389d57808b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a719a82ae4
commit
0260b4b4d5
@@ -1,12 +1,16 @@
|
||||
<html>
|
||||
<body>
|
||||
Reports redundant calls to unmodifiable collection wrappers within the
|
||||
Reports redundant calls to unmodifiable collection wrappers from the
|
||||
<code>Collections</code> class.
|
||||
<p>If the argument that is passed to an unmodifiable
|
||||
collection wrapper is already immutable, such a wrapping becomes redundant.</p>
|
||||
<p>Example:</p>
|
||||
<pre><code>
|
||||
Collections.unmodifiableList(Collections.singletonList("abc"));
|
||||
List<String> x = Collections.unmodifiableList(Collections.singletonList("abc"));
|
||||
</code></pre>
|
||||
<p>After the quick-fix is applied:</p>
|
||||
<pre><code>
|
||||
List<String> x = Collections.singletonList("abc");
|
||||
</code></pre>
|
||||
<p>In order to detect the methods that return unmodifiable collections, the
|
||||
inspection uses the <code>org.jetbrains.annotations.Unmodifiable</code>
|
||||
|
||||
Reference in New Issue
Block a user