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 used to check the quality of the written Java code. This not only occurs due to the use of checkstyle plugin but also due to the use of SonarQube or…

Continue

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 and maintainable for future. You may also like to read Code quality using SonarQube or Jacoco in Gradle Projects.

Continue