Back to Intellij Community

Convert2Diamond

java/java-impl/resources/inspectionDescriptions/Convert2Diamond.html

2025.3-rc-2273 B
Original Source

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<>();