Inspectopedia
 
2024.3

Explicit type can be replaced with '<>'

Warning
New
Last modified: 03 December 2024

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

Example:

After the quick-fix is applied:

This inspection depends on the Java feature 'Diamond types', which is available since Java 7.