mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
CollectionAddAllCanBeReplacedWithConstructor: description updated; category set to Code style
Review ID: IDEA-CR-24901
This commit is contained in:
+2
-1
@@ -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<String> set = new HashSet<>();
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user