From 17fcbb53210a7122f59331a57a766227a0826b7a Mon Sep 17 00:00:00 2001 From: Justin Field Date: Tue, 14 Mar 2017 14:17:24 -0700 Subject: [PATCH] fix findbugs --- .../core/RestoreCompleteCerberusDataFromS3BackupOperation.java | 2 +- src/main/java/com/nike/cerberus/service/ConsoleService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java b/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java index 3e2285b1..be39d3ac 100644 --- a/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java +++ b/src/main/java/com/nike/cerberus/operation/core/RestoreCompleteCerberusDataFromS3BackupOperation.java @@ -194,7 +194,7 @@ private void validateRestore(S3StoreService s3StoreService, RestoreCompleteCerbe } if (! proceed.equalsIgnoreCase("proceed")) { - System.exit(1); + throw new RuntimeException("User did not confirm to proceed with backup restore"); } } diff --git a/src/main/java/com/nike/cerberus/service/ConsoleService.java b/src/main/java/com/nike/cerberus/service/ConsoleService.java index d36cb197..31f7bac2 100644 --- a/src/main/java/com/nike/cerberus/service/ConsoleService.java +++ b/src/main/java/com/nike/cerberus/service/ConsoleService.java @@ -35,7 +35,7 @@ public String readLine(String format, Object... args) throws IOException { return System.console().readLine(format, args); } System.out.print(String.format(format, args)); - BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); + BufferedReader reader = new BufferedReader(new InputStreamReader(System.in, "UTF-8")); return reader.readLine(); }