Back to Intellij Community

MismatchedArrayReadWrite

java/java-impl/resources/inspectionDescriptions/MismatchedArrayReadWrite.html

2025.3-rc-2254 B
Original Source

Reports arrays whose contents are read but not updated, or updated but not read. Such inconsistent reads and writes are pointless and probably indicate dead, incomplete or erroneous code.

Example:

final int[] bar = new int[3];
  bar[2] = 3;