Merge branch '2is10-npe-warning'

This commit is contained in:
Roel Spilker committed 2018-01-09 13:11:03 +01:00
commit 01754d9140
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> T sneakyThrow0(Throwable t) throws T {
throw (T)t;
}