| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static RuntimeException | Returns: never returns anything sincet is always thrown.the throwable that should be sneaked through compiler checks. May not be t)null.Throws the given exception and sneaks it through any compiler checks. |
| private static <T extends Throwable> void |
| Exceptions | back to summary |
|---|---|
| public Exceptions() | |
| sneakyThrow | back to summary |
|---|---|
| public static RuntimeException sneakyThrow(Throwable t) Throws the given exception and sneaks it through any compiler checks. This allows to throw checked exceptions without the need to declare it. Clients should use the following idiom to trick static analysis and dead code checks:
throw sneakyThrow(new CheckedException("Catch me if you can ;-)")).
This method is heavily inspired by project
Lombok.
| |
| sneakyThrow0 | back to summary |
|---|---|
private static <T extends Throwable> void sneakyThrow0(Throwable t) throws Throwable-:T
| |