diff --git a/java/java-impl/src/inspectionDescriptions/RedundantUnmodifiable.html b/java/java-impl/src/inspectionDescriptions/RedundantUnmodifiable.html index e75a63f9eb1e..baf3c184fb66 100644 --- a/java/java-impl/src/inspectionDescriptions/RedundantUnmodifiable.html +++ b/java/java-impl/src/inspectionDescriptions/RedundantUnmodifiable.html @@ -1,12 +1,16 @@
-Reports redundant calls to unmodifiable collection wrappers within the +Reports redundant calls to unmodifiable collection wrappers from theCollections class.
If the argument that is passed to an unmodifiable collection wrapper is already immutable, such a wrapping becomes redundant.
Example:
- Collections.unmodifiableList(Collections.singletonList("abc"));
+ List<String> x = Collections.unmodifiableList(Collections.singletonList("abc"));
+
+After the quick-fix is applied:
+
+ List<String> x = Collections.singletonList("abc");
In order to detect the methods that return unmodifiable collections, the
inspection uses the org.jetbrains.annotations.Unmodifiable