Inspectopedia Help

Caught exception is immediately rethrown

Reports catch blocks that immediately rethrow the caught exception without performing any action on it. Such catch blocks are unnecessary and have no error handling.


try { new FileInputStream(""); } catch (FileNotFoundException e) { throw e; }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023