facebook pixelJava Static Analysis Rules
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
      Medium

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

      Learn more

      AvoidProtectedMethodInFinalClassNotExtending

      Code style
      Medium

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

      ConfusingTernary

      Code style
      Medium

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

      FieldDeclarationsShouldBeAtStartOfClass

      Code style
      Medium

      Fields should be declared at the top of the class

      ForLoopShouldBeWhileLoop

      Code style
      Medium

      This for loop could be simplified to a while loop

      UnnecessaryLocalBeforeReturn

      Code style
      Medium

      Consider simply returning the value vs storing it in local variable 'searchOptions'