Exception created but not thrown
- Has Fix?
Alternate names: ThrowableInstanceNeverThrown
The exception is created with
new, but is not thrown, and the reference is
Creating an exception without using it is unlikely to be correct, so we assume
that you wanted to throw the exception.
Suppress false positives by adding the suppression annotation
@SuppressWarnings("DeadException") to the enclosing element.