Unnecessary zero length array usage

Last modified: Last modified: 18 September 2025

Reports allocations of arrays with known lengths of zero when there is a constant for that in the class of the array's element type. As zero-length arrays are immutable, you can save memory reusing the same array instance.

Example:

After the quick-fix is applied: