Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: REM cost reform

...

According to the Java API for the read(byte[] b, int off, int len) method:

An attempt is made to read as many as len bytes, but a smaller number may be read, possibly zero. 

Both read methods return as soon as they find available input data. As a result, these methods can stop reading data before the array is filled because the available data may be insufficient to fill the array.

...

Incorrect use of the read() method can result in the wrong number of bytes being read or character sequences being interpreted incorrectly.

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

FIO10-J

Low

Unlikely

No

NoMedium

P2P1

L3

Automated Detection

ToolVersionCheckerDescription
Parasoft Jtest
Include Page
Parasoft_V
Parasoft_V
CERT.FIO10.NASSIGIOEnsure the return values of specified file I/O methods are used
SonarQube
Include Page
SonarQube_V
SonarQube_V
S2674

...