mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
27 lines
531 B
HTML
27 lines
531 B
HTML
<html>
|
|
<body>
|
|
Reports copy constructors that don't copy all the fields of the class.
|
|
<p>
|
|
<code>final</code> fields with initializers and <code>transient</code> fields are considered unnecessary to copy.
|
|
</p>
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
class Point {
|
|
|
|
private int x;
|
|
private int y;
|
|
|
|
Point(int x, int y) {
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
|
|
Point(Point other) {
|
|
// fields x and y are not initialized
|
|
}
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2018.1</small>
|
|
</body>
|
|
</html> |