From 1f901480caf065e0cc98f24af3f752f8e1310812 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sun, 7 Jan 2018 20:33:39 -0600 Subject: 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 --- .../main/java/com/wireguard/android/configStore/FileConfigStore.java | 4 ++-- 1 file 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; } } -- cgit v1.2.3