Added clarifying comment for ExceptionUtils.rethrow()

This commit is contained in:
Evgeny Gerashchenko
2012-06-28 15:06:46 +04:00
parent ef19700283
commit cfc1d6d271
@@ -25,6 +25,10 @@ public class ExceptionUtils {
/**
* Translate exception to unchecked exception.
*
* Return type is specified to make it possible to use it like this:
* throw ExceptionUtils.rethrow(e);
* In this case compiler knows that code after this rethrowing won't be executed.
*/
public static RuntimeException rethrow(Throwable e) {
if (e instanceof RuntimeException) {