Inspectopedia Help

Redundant type arguments

Reports calls to parametrized methods with explicit argument types that can be omitted since they will be unambiguously inferred by the compiler.

Using redundant type arguments is unnecessary and makes the code less readable.

Example:

List<String> list = Arrays.<String>asList("Hello", "World");

A quick-fix is provided to remove redundant type arguments:

List<String> list = Arrays.asList("Hello", "World");

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023