Inspectopedia Help

'clone()' instantiates objects with constructor

Reports calls to object constructors inside clone() methods.

It is considered good practice to call clone() to instantiate objects inside of a clone() method instead of creating them directly to support later subclassing. This inspection will not report clone() methods declared as final or clone() methods on final classes.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023