Created
November 1, 2011 17:43
-
-
Save eishay/1331303 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code licensed under the Apache License v2.0 http://www.apache.org/licenses/LICENSE-2.0 | |
public class AnyThrow { | |
public static RuntimeException uncheked(Throwable e) { | |
AnyThrow.<RuntimeException>throwAny(e); | |
return null; | |
} | |
@SuppressWarnings("unchecked") | |
private static <E extends Throwable> void throwAny(Throwable e) throws E { | |
throw (E)e; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure.
Code licensed under the Apache License v2.0 http://www.apache.org/licenses/LICENSE-2.0