This rule is Obsolete | |
Synopsis: | Avoid unnecessary constructors - the compiler will generate these for you |
Language: | Java |
Severity Level: | 5 |
Category: | Controversial |
Description: |
This rule detects when a constructor is not necessary; i.e., when there's only one constructor,
it's public, has an empty body, and takes no arguments.public class Foo { public Foo() {} } |