From cab57e81ef34a7f2f2817787d4eccca06e261240 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 16 Jul 2018 15:05:04 +0200 Subject: InetAddresses: unwrap reflection exceptions --- app/src/main/java/com/wireguard/config/InetAddresses.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java') diff --git a/app/src/main/java/com/wireguard/config/InetAddresses.java b/app/src/main/java/com/wireguard/config/InetAddresses.java index 3cc84b01..b7304cce 100644 --- a/app/src/main/java/com/wireguard/config/InetAddresses.java +++ b/app/src/main/java/com/wireguard/config/InetAddresses.java @@ -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()); } } } -- cgit v1.2.3