Inspectopedia Help

Java 7

'equals()' expression replaceable by 'Objects.equals()' expression  

Reports expressions that can be replaced with a call to java.util.Objects#equals.

'try finally' can be replaced with 'try' with resources  

Reports try-finally statements that can use Java 7 Automatic Resource Management, which is less error-prone.

Explicit type can be replaced with '<>'  

Reports new expressions with type arguments that can be replaced a with diamond type <>.

Identical 'catch' branches in 'try' statement  

Reports identical catch sections in a single try statement.

Possible heap pollution from parameterized vararg type  

Reports methods with variable arity, which can be annotated as @SafeVarargs.

Last modified: 18 June 2024