mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 18:15:59 +00:00
Merge branch '2is10-npe-warning'
This commit is contained in:
commit
01754d9140
1 file changed
+2
-3
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user