Merge branch 'npe-warning' of https://github.com/2is10/lombok into 2is10-npe-warning

This commit is contained in:
Roel Spilker committed 2018-01-09 13:09:23 +01:00
commit 371b9712df
1 file changed
+2 -3
+2 -3
View File
@@ -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> RuntimeException sneakyThrow0(Throwable t) throws T {
throw (T)t;
}