空の finally ブロックを報告します。

空の finally ブロックは多くの場合、コーディングの誤りです。 また、コードリファクタリングの残存物である可能性があり、安全に除去できます。

このインスペクションは JSP ファイルに含まれる空の finally ブロックを報告しません。

例:


  try {
    Files.readString(Paths.get("in.txt"));
  } catch (IOException e) {
    throw new RuntimeException(e);
  } finally {

  }

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


  try {
    Files.readString(Paths.get("in.txt"));
  } catch (IOException e) {
    throw new RuntimeException(e);
  }