Files
openide/java/java-impl/resources/inspectionDescriptions/SynchronizeOnValueBasedClass.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

16 lines
500 B
HTML

<html>
<body>
Reports attempts to synchronize on an instance of a value-based class that produce compile-time warnings and raise
run-time exceptions starting from Java 16.
<p>
For example, <code>java.lang.Double</code> is annotated with <code>jdk.internal.ValueBased</code>, so the following code will
produce a compile-time warning:
</p>
<pre><code>
Double d = 20.0;
synchronized (d) { ... } // javac warning
</code></pre>
<!-- tooltip end -->
<p><small>New in 2021.1</small></p>
</body>
</html>