Find Cloneable types that do not override clone()

Proprietary

Marks classes and records that are java.lang.Cloneable, directly or through a supertype, and that would still call Object.clone(). Cloneable only tells Object.clone() not to throw; it declares no method of its own, so the compiler cannot enforce the contract and the type is left with a shallow field copy it never asked for. A type is not marked when it or an ancestor declares clone(), since that override is what it would call.

io.moderne.staticanalysis.FindCloneableWithoutClone
mod run . --recipe=io.moderne.staticanalysis.FindCloneableWithoutClone

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.