Tag: checkstyle
Utility classes should not have a public or default constructor – Spring Boot
Author: Soumitra Leave a Comment on Utility classes should not have a public or default constructor – Spring Boot
Introduction The error, utility classes should not have a public or default constructor, you notice mainly in utility classes where you have declared your class method(s) as public static and your class does not have private constructor as well as your class cannot be made as final. This error occurs due to the checkstyle rules defined generally in checkstyle.xml that is…
Posted in Gradle
How to use checkstyle plugin in gradle based project
Introduction I will show here how to use checkstyle plugin in gradle based Java project. Checkstyle is a static code quality tool used to find Fan-out complexity of a class, complexity of method, utility class, bugs due to not following the coding standards. So you can remove the complexity from your Java source code and make the code more readable…