Java Development Tools
JUnit |
|
Java Editor |
|
New boolean if/else clean-up |
A new clean-up has been created to combine two opposite boolean returns controlled by an if statement into a single return where possible.
To use the clean-up, go to the Code Style tab of the clean-up configuration dialog under Control statements and select: Simplify boolean if/else to single return if possible. For example, applying the clean-up to the following code: results in: |
Null handling for if/else to switch clean-up |
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 case null statement needs to be added.
The clean-up is accessed on the Code style tab of the clean-up configuration dialog under Control statements and selecting: Convert if/else if/else chain with 3 blocks min to switch. Applying the clean-up to the following code:
results in the following when Java version is less than 21 and results in the following when the Java release is set to 21 and up: |
Java Views and Dialogs |
|
New Filter Options in Call Hierarchy |
This change helps filtering your results after calling the Call Hierarchy on a method. With more filter options that are also much more understandable, you can filter your results much better than before. In the following picture you can see the new filter Options!
|
Show the Filters in the buttons bar of the Call Hierarchy view |
Thanks to this change, you can easily access the filters after calling the call hierarchy on a method. 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.
You can still use the old way to access the filter like so:
|
Java Compiler |
|
Configure problem severity for unused lambda parameters |
You can configure the problem severity for unused lambda parameters with the new option in
Preferences > Java > Compiler > Errors/Warnings:
|
Java Formatter |
|
Debug |
|
JDT Developers |
|