mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
16 lines
500 B
HTML
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> |