Make finalize() overrides protected
ProprietaryChanges a public override of Object#finalize() to protected, the visibility Object gives it, so that code outside the class hierarchy cannot call it. Only the garbage collector should. The method is left public when it overrides a public finalize() of a supertype or an interface, which it cannot narrow, when a subclass or an intersection type inherits it to implement an interface's finalize(), and when anything in the repository calls finalize() on its class or a subclass, or calls a finalize() whose type is not known. Interfaces, and test sources, are not changed.
io. moderne. staticanalysis. MakeFinalizeProtectedmod run . --recipe= io. moderne. staticanalysis. MakeFinalizeProtectedInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.