CollectionAddAllCanBeReplacedWithConstructor: description updated; category set to Code style

Review ID: IDEA-CR-24901
This commit is contained in:
Tagir Valeev
2017-09-28 11:18:42 +07:00
parent b75c0596db
commit cac7576b37
2 changed files with 3 additions and 2 deletions
@@ -1,7 +1,8 @@
<html>
<body>
Reports <b>Collection.addAll()</b> and <b>Map.putAll()</b> calls after instantiation of a collection using a constructor call without arguments.
Such constructs can be replaced with a single call to a parametrized constructor.
Such constructs can be replaced with a single call to a parametrized constructor which simplifies code. Also for some collections the replacement
might be more performant.
For example:
<pre><code>
Set&lt;String&gt; set = new HashSet&lt;&gt;();
+1 -1
View File
@@ -880,7 +880,7 @@
displayName="Duplicated delimiters in java.util.StringTokenizer"/>
<localInspection groupPath="Java" language="JAVA" shortName="CollectionAddAllCanBeReplacedWithConstructor"
groupBundle="messages.InspectionsBundle"
groupKey="group.names.performance.issues" enabledByDefault="true" level="WARNING"
groupKey="group.names.code.style.issues" enabledByDefault="true" level="WARNING"
implementationClass="com.intellij.codeInspection.CollectionAddAllCanBeReplacedWithConstructorInspection"
displayName="Redundant 'Collection.addAll()' call"/>
<localInspection groupPath="Java,Java language level migration aids" language="JAVA" shortName="AnonymousHasLambdaAlternative" displayName="Anonymous type has shorter lambda alternative"