[java] SynchronizeOnNonFinalFieldInspection inspection description updated

GitOrigin-RevId: 11e3fa59290fd3741239d9d27f4979538d5399ab
This commit is contained in:
Olga.Klisho
2021-03-16 18:41:55 +00:00
committed by intellij-monorepo-bot
parent 9ef0d93883
commit f0aa03ded9
@@ -1,10 +1,16 @@
<html>
<body>
Reports <b>synchronized</b> statements where the lock expression
Reports the <b>synchronized</b> statements where the lock expression
is a reference to a non-<b>final</b> field. Such statements are unlikely to have useful semantics, as different
threads may be locking on different objects even when operating on the same object.
<!-- tooltip end -->
<p>
<p>Example: </p>
<pre>
private Object o;
public void foo() {
synchronized (o) // synchronization on a non-final field
{ }
}
</pre>
</body>
</html>