switch
expressions or enhanced switch
statements with an expression body.
These 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!";
}
...
};
New in 2019.1