Versions Compared

Key

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

...

Synchronizing on the class object returned by getClass() can result in nondeterministic undesired behavior.

Rule

Severity

Likelihood

Detectable

Remediation CostRepairable

Priority

Level

LCK02-J

Medium

Probable

Yes

NoMedium

P8

L2

Automated Detection

Some static analysis tools can detect violations of this rule

ToolVersionCheckerDescription
Parasoft Jtest

Include Page
Parasoft_V
Parasoft_V

TRSCERT.LCK02.SGCDo not synchronize on the class object returned by the 'getClass' method
SonarQube
Include Page
SonarQube_V
SonarQube_V

S3067


...