Files
openide/java/java-impl/resources/inspectionDescriptions/ZeroLengthArrayInitialization.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
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>