Skip to content

Commit

Permalink
Merge branch '2is10-npe-warning'
Browse files Browse the repository at this point in the history
  • Loading branch information
rspilker committed Jan 9, 2018
2 parents aaa876d + 5a2fe6e commit 01754d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/lombok/Lombok.java
Expand Up @@ -48,12 +48,11 @@ public class Lombok {
*/
public static RuntimeException sneakyThrow(Throwable t) {
if (t == null) throw new NullPointerException("t");
Lombok.<RuntimeException>sneakyThrow0(t);
return null;
return Lombok.<RuntimeException>sneakyThrow0(t);
}

@SuppressWarnings("unchecked")
private static <T extends Throwable> void sneakyThrow0(Throwable t) throws T {
private static <T extends Throwable> T sneakyThrow0(Throwable t) throws T {
throw (T)t;
}

Expand Down

0 comments on commit 01754d9

Please sign in to comment.