Inspectopedia Help

'Throwable' not thrown

Reports instantiations of Throwable or its subclasses, where the created Throwable is never actually thrown. Additionally, this inspection reports method calls that return instances of Throwable or its subclasses, when the result of the method call is not thrown.

Calls to methods annotated with the Error Prone's or AssertJ's @CanIgnoreReturnValue annotation will not be reported.


void check(String s) { if (s == null) { new NullPointerException("s"); } // ... }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023