1
assyliasについてよく説明しますfinal rethrow。 最後にmethod3
に追加しました。java7での正確な再提供例外
public void method4() throws IOException {
try {
throw new IOException("1");
} catch (final Exception e) {
e = new IOException("2"); //does not compile
throw e; //does not compile
}
}
コンパイラを1.7に設定しました。 は、2つのエラーをコンパイルしています
だから、final exception can neither be reassigned nor throw precise exception.
を、明示最終例外は唯一の変更を防止するために使用されていますか?