From 9ee976823dfc18e7ba5cf885b92032504b060ed9 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 24 Apr 2018 03:31:10 +0200 Subject: Throw IllegalArgumentExceptions when arguments are bad This will make the two way data binding crash more, but it will improve the robustness of the config file parser, which deals with exceptions gracefully, and when we move to one way data binding, it will help with that too. Signed-off-by: Jason A. Donenfeld --- app/src/main/java/com/wireguard/config/Attribute.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/src/main/java/com/wireguard/config/Attribute.java') diff --git a/app/src/main/java/com/wireguard/config/Attribute.java b/app/src/main/java/com/wireguard/config/Attribute.java index b574ecfa..c73e9f2e 100644 --- a/app/src/main/java/com/wireguard/config/Attribute.java +++ b/app/src/main/java/com/wireguard/config/Attribute.java @@ -51,7 +51,7 @@ enum Attribute { } public static String[] stringToList(final String string) { - return string.trim().split("\\s*,\\s*", -1); + return string.trim().split("\\s*,\\s*"); } public String composeWith(final Object value) { -- cgit v1.2.3