Java
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:
List<String> list = new ArrayList<String>(); // reports array list type argument
After the quick-fix is applied:
List<String> list = new ArrayList<>();
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
Convert2Diamond
This inspection depends on the Java feature 'Diamond types', which is available since Java 7.
Inspection Details | |
---|---|
By default bundled with: | |
Can be installed with plugin: | Java, 243.23126 |
Thanks for your feedback!
Was this page helpful?