Versions Compared

Key

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

...

Failure to encase the wait() or await() methods inside a while loop can lead to indefinite blocking and denial of service (DoS).

Rule

Severity

Likelihood

Detectable

RepairableRemediation Cost

Priority

Level

THI03-J

Low

Unlikely

Yes

NoMedium

P2

L3

Automated Detection

ToolVersionCheckerDescription
Klocwork

Include Page
Klocwork_V
Klocwork_V

JAVA.WAIT.IN.LOOP
Parasoft Jtest
Include Page
Parasoft_V
Parasoft_V
CERT.THI03.UWILCall 'wait()' and 'await()' only inside a loop that tests the liveness condition
SonarQube
Include Page
SonarQube_V
SonarQube_V
S2274"Object.wait(...)" and "Condition.await(...)" should be called inside a "while" loop

...