|
|
|
|
|
by elFarto
2103 days ago
|
|
There's also this magic function: private static <T extends Throwable> T sneakyThrow(Throwable ex) throws T {
throw (T) ex;
}
Due to generic type erasure, the entire throw clause gets erased so it looks like this method doesn't throw anything. |
|