switch ステートメントのラベル付きルール、または冗長なコードブロックを持つ switch 式を報告します。

例:


  String s = switch (n) {
    case 1 -> { yield Integer.toString(n); }
    default -> "default";
  };

クイックフィックス適用後:


  String s = switch (n) {
    case 1 -> Integer.toString(n);
    default -> "default";
  };

2019.1 の新機能です