From 16c0b5b15add29744e1e9d22c09a040632842dae 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(-) (limited to 'app/src/main/java') 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