src/main/java/org/opentripplanner/api/resource

Severity

Blocker 0
Critical 1
Major 266
Minor 226
Info 30

Rule

Throwable.printStackTrace(...) should not be called 1
Control structures should use curly braces 57
Statements should be on separate lines 26
Branches should have sufficient coverage by unit tests 20
Declarations should use Java collection interfaces such as "List" rather than specific implementation classes such as "LinkedList" 18
Class variable fields should not have public accessibility 15
Sections of code should not be "commented out" 13
Exception handlers should preserve the original exceptions 12
Unused local variables should be removed 10
Methods should not be too complex 9
Unused "private" fields should be removed 8
Deprecated elements should have both the annotation and the Javadoc tag 8
Generic exceptions should never be thrown 8
Method parameters, caught exceptions and foreach variables should not be reassigned 7
"FIXME" tags should be handled 6
Collection.isEmpty() should be used to test for emptiness 5
Methods should not have too many parameters 5
Close curly brace and the next "else", "catch" and "finally" keywords should be located on the same line 5
Loops should not contain more than a single "break" or "continue" statement 5
Useless parentheses around expressions should be removed to prevent any misunderstanding 4
Collapsible "if" statements should be merged 4
Local variable and method parameter names should comply with a naming convention 4
Strings literals should be placed on the left side when checking for equality 3
"switch" statements should end with "default" clauses 2
Source files should not have any duplicated blocks 2
Empty statements should be removed 2
Unused method parameters should be removed 2
Expressions should not be too complex 2
A close curly brace should be located at the beginning of a line 1
Methods should not be empty 1
Try-catch blocks should not be nested 1
Utility classes should not have public constructors 1
Magic numbers should not be used 108
Comments should not be located at the end of lines of code 67
Control flow statements "if", "for", "while", "switch" and "try" should not be nested too deeply 18
Tabulation characters should not be used 8
Array designators "[]" should be on the type, not the variable 5
The members of an interface declaration or class should appear in a pre-defined order 5
Local Variables should not be declared and then immediately returned or thrown 5
Useless imports should be removed 5
Boolean literals should not be redundant 4
String literals should not be duplicated 1
"TODO" tags should be handled 22
Deprecated code should be removed eventually 8