Inspectopedia 2024.3 Help

Java 5

'BigDecimal' legacy method called   New in this release

Reports calls to BigDecimal.divide() or BigDecimal.setScale() that use integer constants to specify the rounding mode.

'String.indexOf()' expression can be replaced with 'contains()'   New in this release

Reports comparisons with String.indexOf() calls that can be replaced with a call to the String.contains() method.

'StringBuffer' may be 'StringBuilder'   New in this release

Reports variables declared as StringBuffer and suggests replacing them with StringBuilder.

'for' loop can be replaced with enhanced for loop   New in this release

Reports for loops that iterate over collections or arrays, and can be automatically replaced with an enhanced for loop (foreach iteration syntax).

'while' loop can be replaced with enhanced 'for' loop   New in this release

Reports while loops that iterate over collections and can be replaced with enhanced for loops (foreach iteration syntax).

Method can have varargs parameter   New in this release

Reports methods that can be converted to variable arity methods.

Raw use of parameterized class   New in this release

Reports generic classes with omitted type parameters.

Reference to empty collection field can be replaced with method call   New in this release

Reports usages of java.util.Collections fields: EMPTY_LIST, EMPTY_MAP or EMPTY_SET.

Unnecessary boxing   New in this release

Reports explicit boxing, that is wrapping of primitive values in objects.

Unnecessary unboxing   New in this release

Reports unboxing, that is explicit unwrapping of wrapped primitive values.

Last modified: 11 September 2024