Files
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

23 lines
900 B
HTML

<html>
<body>
Reports constructors whose number of parameters exceeds the specified maximum.
Such objects are hard to instantiate, especially if some parameters are optional.
Constructors with too many parameters may indicate that refactoring is necessary.
Consider applying the builder pattern, for example.
<p><b>Example:</b></p>
<pre><code>
public BankAccount(long accountNumber,
String owner,
double balance,
double interestRate) {
// fields initialization
}
</code></pre>
<!-- tooltip end -->
<p>Configure the inspection:</p>
<ul>
<li>Use the <b>Parameter limit</b> field to specify the maximum allowed number of parameters in a constructor.</li>
<li>Use the <b>Ignore constructors with visibility</b> list to specify whether the inspection should ignore constructors with specific visibility.</li>
</ul>
</body>
</html>