diff options
author | Samuel Holland <samuel@sholland.org> | 2018-01-07 20:33:39 -0600 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2018-01-07 20:33:39 -0600 |
commit | 16c0b5b15add29744e1e9d22c09a040632842dae (patch) | |
tree | feefb79cfb036cc4727c77de992e673041b6fe2f | |
parent | 0ab3e294321e5a50d61474ff29391d40edf9e443 (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>
-rw-r--r-- | app/src/main/java/com/wireguard/android/configStore/FileConfigStore.java | 4 |
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; } } |