switch
expressions or enhanced switch
statements
that can be converted to code blocks.
Example:
String message = switch (errorCode) {
case 404 -> "Not found!";
...
};
After the quick-fix is applied:
String message = switch (errorCode) {
case 404 -> {
yield "Not found!";
}
...
};
The inspection only reports if the language level of the project or module is 14 or higher.
New in 2019.1