mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 08:00:18 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
24 lines
846 B
HTML
24 lines
846 B
HTML
<html>
|
|
<body>
|
|
Reports <code>public</code> constructors in non-<code>public</code> classes.
|
|
<p>Usually, there is no reason for creating a <code>public</code> constructor in a class with a lower access level.
|
|
Please note, however, that this inspection changes the behavior of some reflection calls. In particular,
|
|
<code>Class.getConstructor()</code> won't be able to find the updated constructor
|
|
(<code>Class.getDeclaredConstructor()</code> should be used instead). Do not use the inspection if your code
|
|
or code of some used frameworks relies on constructor accessibility via <code>getConstructor()</code>.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class House {
|
|
public House() {}
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
class House {
|
|
House() {}
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
</body>
|
|
</html> |