summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-03-26 00:51:36 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-03-26 00:51:36 -0600
commit2958144fd0082489a996fbc7a11572f3edbe42eb (patch)
treee18ffe04ca272dd1e9732b56ce4581027beada0b /ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt
parentade8f18a9550b340904cc608029c0fa4fe7186c0 (diff)
ui: cleanup various pieces of kotlin
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt
index 460c2146..d1b01944 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/ConfigNamingDialogFragment.kt
@@ -49,8 +49,8 @@ class ConfigNamingDialogFragment : DialogFragment() {
val configBytes = configText!!.toByteArray(StandardCharsets.UTF_8)
config = try {
Config.parse(ByteArrayInputStream(configBytes))
- } catch(e: Exception) {
- when(e) {
+ } catch (e: Exception) {
+ when (e) {
is BadConfigException, is IOException -> throw IllegalArgumentException("Invalid config passed to ${javaClass.simpleName}", e)
else -> throw e
}