InetAddresses: unwrap reflection exceptions
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
71cf39660f
commit
04ff63f1b5
@ -34,7 +34,7 @@ public final class InetAddresses {
|
||||
try {
|
||||
return (InetAddress) PARSER_METHOD.invoke(null, address);
|
||||
} catch (final IllegalAccessException | InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new RuntimeException(e.getCause() == null ? e : e.getCause());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user