You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The if/else to switch clean-up has been enhanced to properly handle the case where the value can be null. In the if/else statement, this is handled intrinsically either by an else statement or falling through the if/else if, but when converting to a switch statement, either the switch must be embedded in an if statement to test for null or for Java 21 or above, a <b>case null</b> statement needs to be added.
104
120
<p>The clean-up is accessed on the <b>Code style</b> tab of the clean-up configuration dialog under <b>Control statements</b> and selecting: <b>Convert if/else if/else chain with 3 blocks min to switch</b>.</p>
105
-
<p>Applying the clean-up to the following code:<p>
121
+
<p>Applying the clean-up to the following code:</p>
106
122
<p><imgsrc="images/ifelse-to-switch-null-before.png" alt="convert if/else to switch before"/></p>
107
123
<p>results in the following when Java version is less than 21</p>
108
124
<p><imgsrc="images/ifelse-to-switch-null-after.png" alt="convert if/else to switch after"/></p>
<tdclass="title"> Show the Filters in the buttons bar of the Call Hierarchy view </td>
@@ -146,13 +186,13 @@ <h2>Java Views and Dialogs</h2>
146
186
With the new, more accessible filters button, changing the filters is easier than ever, especially now that there are more and better options to filter the results.
147
187
</p>
148
188
<p>
149
-
<imgsrc="images\move-filtersbutton-to-top.png" alt="Filters Button on Top bar">
189
+
<imgsrc="images\move-filtersbutton-to-top.png" alt="Filters Button on Top bar"/>
150
190
</p>
151
191
<p>
152
192
You can still use the old way to access the filter like so:
0 commit comments