Inspectopedia
 
2024.3

Redundant 'new' expression in constant array creation

Warning
New
Last modified: 03 December 2024

Reports constant new array expressions that can be replaced with an array initializer. Array initializers can omit the type because it is already specified in the left side of the assignment.

Example:

After the quick-fix is applied: