Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

LCK09-J-EX1: Methods that require multiple locks may hold several locks while waiting for the remaining locks to become available. This constitutes a valid exception, although the programmer must follow other applicable rules, especially LCK07-J. Avoid deadlock by requesting and releasing locks in the same order to avoid deadlock .

Automated Detection

Some static analysis tools are capable of detecting violations of this rule.

...

CCE_LK_LOCKED_BLOCKING_CALLS

...

Risk Assessment

Blocking or lengthy operations performed within synchronized regions could result in a deadlocked or unresponsive system.

Rule

Severity

Likelihood

Remediation Cost

Priority

Level

LCK09-J

Low

Probable

High

P2

L3

Automated Detection

Some static analysis tools are capable of detecting violations of this rule.

ToolVersionCheckerDescription
Parasoft Jtest9.5TRS.TSHL, BD.TRS.TSHLImplemented
ThreadSafe
Include Page
ThreadSafe_V
ThreadSafe_V

CCE_LK_LOCKED_BLOCKING_CALLS

Implemented
SonarQube Java Plugin
Include Page
SonarQube Java Plugin_V
SonarQube Java Plugin_V
S2276Implemented

Related Guidelines

...