Files
openide/plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovySynchronizationOnThis.html
Konstantin Nisht 73a842644a [groovy] Re-proofread inspection messages
GitOrigin-RevId: d946743c6f9ea2a1cb44f5676f4098d9e56e4d49
2021-06-02 15:13:27 +00:00

14 lines
613 B
HTML

<html>
<body>
Reports synchronization which uses <code>this</code> as its lock expression.
<p>
Constructs reported include <code>synchronized</code>
blocks which lock <code>this</code>, and calls to <code>wait()</code>
<code>notify()</code> or <code>notifyAll()</code> which target <code>wait()</code>.
Such constructs, like synchronized methods, make it hard to track just who is locking on a given
object, and make possible "denial of service" attacks on objects. As an alternative, consider
locking on a private instance variable, access to which can be completely controlled.
</p>
</body>
</html>