summaryrefslogtreecommitdiffhomepage
path: root/app/src
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-01-07 20:33:39 -0600
committerSamuel Holland <samuel@sholland.org>2018-01-07 20:33:39 -0600
commit16c0b5b15add29744e1e9d22c09a040632842dae (patch)
treefeefb79cfb036cc4727c77de992e673041b6fe2f /app/src
parent0ab3e294321e5a50d61474ff29391d40edf9e443 (diff)
FileConfigStore: Move function returns outside try blocks
This makes more clear what things can throw exceptions, and the functions' control flow. Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java b/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java
index 30b2fba8..2006924f 100644
--- a/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java
+++ b/app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java
@@ -38,8 +38,8 @@ public final class FileConfigStore implements ConfigStore {
}
try (FileOutputStream stream = new FileOutputStream(file, false)) {
stream.write(config.toString().getBytes(StandardCharsets.UTF_8));
- return config;
}
+ return config;
}
@Override
@@ -78,7 +78,7 @@ public final class FileConfigStore implements ConfigStore {
}
try (FileOutputStream stream = new FileOutputStream(file, false)) {
stream.write(config.toString().getBytes(StandardCharsets.UTF_8));
- return config;
}
+ return config;
}
}