mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
20 lines
466 B
HTML
20 lines
466 B
HTML
<html>
|
|
<body>
|
|
Reports local variable declarations that can be replaced with pattern variables, which are usually more compact.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
if (obj instanceof String) {
|
|
String str = (String) obj;
|
|
System.out.println(str);
|
|
}
|
|
</code></pre>
|
|
<p>Can be replaced with:</p>
|
|
<pre><code>
|
|
if (obj instanceof String str) {
|
|
System.out.println(str);
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p><small>New in 2020.1</small></p>
|
|
</body>
|
|
</html> |