The method acknowledgeInterruptAndStop implements the thread termination policy. It doesn't seem to me that this inspection should fire if the exception is conditionally rethrown.
Description
The "exception immediately rethrown" inspection fires (erroneously) on the following code:
The method acknowledgeInterruptAndStop implements the thread termination policy. It doesn't seem to me that this inspection should fire if the exception is conditionally rethrown.
@SuppressWarnings({"CaughtExceptionImmediatelyRethrown"}) protected static Method getActionMethod(final Class<?> actionClass, final String methodName) throws NoSuchMethodException { Method method; try { method = actionClass.getMethod(methodName, NO_PARAMS); } catch (NoSuchMethodException e) { // hmm -- OK, try doXxx instead try { final String altMethodName = "do" + methodName.substring(0, 1).toUpperCase() + methodName.substring(1); method = actionClass.getMethod(altMethodName, NO_PARAMS); } catch (NoSuchMethodException e1) { // throw the original one throw e; } } return method; }It is far from being immediately rethrown ...