Inspectopedia
 
2024.3

C-style array declaration

Warning
New
Last modified: 03 December 2024

Reports array declarations written in C-style syntax, where the array brackets are placed after a variable name or after a method parameter list. Most code styles prefer Java-style array declarations, where the array brackets are placed after the type name.

Example:

After the quick-fix is applied:

Configure the inspection:

Use the Ignore C-style declarations in variables option to report C-style array declaration of method return types only.