summaryrefslogtreecommitdiffhomepage
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
commit1f901480caf065e0cc98f24af3f752f8e1310812 (patch)
treefeefb79cfb036cc4727c77de992e673041b6fe2f
parent381cfb5eae4dc593cb7273f0619dc76d4d599a22 (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.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;
}
}