Inspectopedia
 
2024.3

Explicit array filling

Warning
New
Last modified: 03 December 2024

Reports loops that can be replaced with Arrays.setAll() or Arrays.fill() calls.

This inspection suggests replacing loops with Arrays.setAll() if the language level of the project or module is 8 or higher. Replacing loops with Arrays.fill() is possible with any language level.

Example:

After the quick-fix is applied:

New in 2017.1