Constructors of an abstract class should not be declared public

MSAL

Constructors of abstract classes can only be called in constructors of their subclasses. Therefore, the visibility of public constructors is reduced to protected. Declaring them public is misleading since it implies they could be invoked directly, which is never possible.

org.openrewrite.staticanalysis.AbstractClassPublicConstructor
mod run . --recipe=org.openrewrite.staticanalysis.AbstractClassPublicConstructor

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