blob: ad3a61e42f8f253426f8cd0313f31f2832d32450 [file]
<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 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;();
set.addAll(Arrays.asList("alpha", "beta", "gamma"));
</code></pre>
can be replaced with:
<pre><code>
Set&lt;String&gt; set = new HashSet&lt;&gt;(Arrays.asList("alpha", "beta", "gamma"));
</code></pre>
Standard JDK collection classes are supported by default. Additionally you may specify other classes in the settings.
</body>
</html>