mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
20 lines
603 B
HTML
20 lines
603 B
HTML
<html>
|
|
<body>
|
|
Reports arrays of enum constants that can be replaced with a call to <code>EnumType.values()</code>.
|
|
<p>Usually, when updating such an enum, you have to update the array as well. However, if you use <code>EnumType.values()</code>
|
|
instead, no modifications are required.</p>
|
|
<p>Example:</p>
|
|
<pre><code>
|
|
enum States {
|
|
NOT_RUN, IN_PROGRESS, FINISHED;
|
|
}
|
|
|
|
handleStates(new States[] {NOT_RUN, IN_PROGRESS, FINISHED});
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
handleStates(States.values());
|
|
</code></pre>
|
|
<p><small>New in 2019.1</small></p>
|
|
</body>
|
|
</html> |