facebook pixelCodiga Analysis Java Rules, category code style
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.

AvoidProtectedFieldInFinalClass

Code style
Warning

Avoid protected fields in a final class. Change to private or package access.

Learn more

AvoidProtectedMethodInFinalClassNotExtending

Code style
Warning

Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access.

ConfusingTernary

Code style
Warning

Avoid if (x != y) ..; else ..;

EmptyMethodInAbstractClassShouldBeAbstract

Code style
Critical

An empty method in an abstract class should be abstract instead

ExtendsObject

Code style
Informational

No need to explicitly extend Object.

FieldDeclarationsShouldBeAtStartOfClass

Code style
Warning

Fields should be declared at the top of the class

ForLoopShouldBeWhileLoop

Code style
Warning

This for loop could be simplified to a while loop

UnnecessaryLocalBeforeReturn

Code style
Warning

Consider simply returning the value vs storing it in local variable