Name | Checked | Synopsis |
---|
Basic1
|
 |
Avoid empty catch blocks |
Basic2
|
 |
Avoid empty 'if' statements |
Basic3
|
 |
Avoid empty 'while' statements |
Basic4
|
 |
Avoid empty try blocks |
Basic5
|
 |
Avoid empty finally blocks |
Basic6
|
 |
Avoid empty switch statements |
Basic7
|
 |
Avoid modifying an outer loop incrementer in an inner loop for update expression |
Basic8
|
 |
This for loop could be simplified to a while loop |
Basic9
|
 |
Avoid unnecessary temporaries when converting primitives to Strings |
Basic10
|
 |
Ensure you override both equals() and hashCode() |
Basic11
|
 |
Double checked locking is not thread safe in Java |
Basic12
|
 |
Avoid returning from a finally block |
Basic13
|
 |
Avoid empty synchronized blocks |
Basic14
|
 |
Avoid unnecessary return statements |
Basic15
|
 |
Empty static initializer was found |
Basic16
|
 |
Do not use 'if' statements that are always true or always false |
Basic17
|
 |
An empty statement (semicolon) not part of a loop |
Basic18
|
 |
Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE |
Basic19
|
 |
Unnecessary modifier used |
Basic20
|
 |
These nested if statements could be combined |
Basic21
|
 |
Overriding method merely calls super |
Basic22
|
 |
This usage of the Collection.toArray() method will throw a ClassCastException |
Basic23
|
 |
Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal |
Basic24
|
 |
An operation on an Immutable object (BigDecimal or BigInteger) won't change the object itself |
Basic25
|
 |
The null check here is misplaced; if the variable is null there'll be a NullPointerException |
Basic26
|
 |
Invoke equals() on the object you've already ensured is not null |
Basic27
|
 |
Avoid using ThreadGroup; it is not thread safe |
Basic28
|
 |
Method call on object which may be null |
Basic29
|
 |
Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) |
Basic30
|
 |
Do not start a literal by 0 unless it's an octal value |
Basic31
|
 |
Replace for loop by for each loop |
Basic32
|
 |
Use @Override annotation if applicable |
Basic33
|
 |
Merge identical catch branches |
Basic34
|
 |
Don't use unclear do/while loops |
Basic100
|
 |
Each variable should have an initializer. |
Basic101
|
 |
Use standard brace style. |
Basic102
|
 |
Avoid implicit allocation of objects |
Basic103
|
 |
Don't modify control variables within a for block |