Files
openide/java/java-impl/resources/inspectionDescriptions/ZeroLengthArrayInitialization.html
2025-02-05 04:43:28 +00:00

15 lines
534 B
HTML

<html>
<body>
Reports allocations of arrays with known lengths of zero.
<p>
Since array lengths in Java are non-modifiable, it is almost always possible to share zero-length arrays, rather than repeatedly
allocate new ones. Such sharing may provide useful optimizations in the program runtime or footprint.
</p>
<p>
Note that the inspection does not report zero-length arrays allocated as static final fields,
since those arrays are assumed to be used for implementing array sharing.
</p>
<!-- tooltip end -->
</body>
</html>