...
The untrusted code attempts to acquire a lock on the object's monitor and upon succeeding, introduces an indefinite delay which holds up the synchronized
changeValue()
method from acquiring the same lock. Note that the untrusted code also violates VOID CON06CON20-J. Do not defer a thread that is perform operations that may block while holding a lock.
Compliant Solution
...
The untrusted code attempts to acquire a lock on the class object's monitor and upon succeeding, introduces an indefinite delay which holds up the synchronized
changeValue()
method from acquiring the same lock. Note that the untrusted code also violates VOID CON06CON20-J. Do not defer a thread that is perform operations that may block while holding a lock.
Compliant Solution
...