mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[java] SynchronizeOnNonFinalFieldInspection inspection description updated
GitOrigin-RevId: 11e3fa59290fd3741239d9d27f4979538d5399ab
This commit is contained in:
committed by
intellij-monorepo-bot
parent
9ef0d93883
commit
f0aa03ded9
+9
-3
@@ -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>
|
||||
Reference in New Issue
Block a user