BACK TO LIST

Java rules

The Codiga Code Analysis engine supports hundreds of rules for Java, checking that your code is safe and secure. Start using Codiga today to check your code and automate your code reviews to find issues in every pull request and merge with confidence.

AbstractClassWithoutAnyMethod

Design
Critical

No abstract method which means that the keyword is most likely used to prevent instantiation. Use a private or protected constructor instead.

Learn more

ClassWithOnlyPrivateConstructorsShouldBeFinal

Design
Critical

A class which only has private constructors should be final

ConstructorCallsOverridableMethod

Error prone
Critical

Overridable method 'getAction' called during object construction

DoubleCheckedLocking

Unknown
Critical

Double checked locking is not thread safe in Java.

EmptyMethodInAbstractClassShouldBeAbstract

Code style
Critical

An empty method in an abstract class should be abstract instead

EqualsNull

Error prone
Critical

Avoid using equals() to compare against null

ReturnEmptyArrayRatherThanNull

Error prone
Critical

Return an empty array rather than null.

We use cookies to improve your site experience, including analytics cookies to understand how you use our product and design better experiences. Please read our Cookie Policy.