Having the method throwUncheckedException() returning something avoids an extra line in a calling method that needs a return value.
Had the exception been thrown directly from the handle method as follows:
public RT handle(Object[] params, Throwable e) {
throw new RuntimeException(e);
}
The return statement would not have been needed (it would even have been illegal actually) because the compiler would be able to know that any statement following the throw would be unreachable.
But since the throw is done in another method, and since a return value is required for the handle method, a return statememt must be added.
Having the throwUncheckedException() return something allows the call to be in the return statement.
The throwUncheckedException() must be something close to:
public static <T> T throwUncheckedException(Throwable e) {
throw new RuntimeException(e);
return null;
}
IMHO, the fact that this raised your question shows that it is too puzzling to be worthy. Perhaps a better way to achieve the same goal would be something like this:
public RT handle(Object[] params, Throwable e) {
throw Exceptions.makeUncheckedException(e);
}