Inspectopedia Help

Java 8

'Collections.sort()' can be replaced with 'List.sort()'  

Reports calls of Collections.

'Comparator' combinator can be used  

Reports Comparator instances defined as lambda expressions that could be expressed using Comparator.

Anonymous type can be replaced with lambda  

Reports anonymous classes which can be replaced with lambda expressions.

Anonymous type can be replaced with method reference  

Reports anonymous classes which can be replaced with method references.

Anonymous type has shorter lambda alternative  

Reports anonymous classes which could be transformed to a constructor or a factory method call with a lambda expression argument.

Expression can be folded into Stream chain  

Reports expressions with a repeating pattern which could be replaced with Stream API or String.

Guava pseudo-functional call can be converted to Stream API call  

Reports usages of Guava pseudo-functional code when Java Stream API is available.

Guava's functional primitives can be replaced with Java  

Reports usages of Guava's functional primitives that can be migrated to standard Java API calls.

Lambda can be replaced with method call  

Reports lambda expressions which can be replaced with a call to a JDK method.

Lambda can be replaced with method reference  

Reports lambdas that can be replaced with method references.

Loop can be collapsed with Stream API  

Reports loops which can be replaced with stream API calls using lambda expressions.

Loop can be replaced with 'Collection.removeIf()'  

Reports loops which can be collapsed into a single Collection.

Loop can be replaced with 'List.replaceAll()'  

Reports loops which can be collapsed into a single List.

Map.forEach() can be used  

Suggests replacing for(Entry<?,?> entry : map.

Simplifiable 'Map' operations  

Reports common usage patterns of java.

Simplifiable forEach() call  

Reports forEach() calls that can be replaced with a more concise method or from which intermediate steps can be extracted.

Standard 'hashCode()' method can be used   New in this release

Reports bitwise operations that can be replaced with a call to the Long.

Statement lambda can be replaced with expression lambda  

Reports lambda expressions with code block bodies when expression-style bodies can be used instead.

Last modified: 29 April 2024