aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorClyhtsuriva <aimeric@adjutor.xyz>2021-06-27 22:16:05 +0200
committerClyhtsuriva <aimeric@adjutor.xyz>2021-06-27 22:16:05 +0200
commitd502b46b9e5504193b25d4aa9a1a03d601344e5d (patch)
treeeb7772484e0cd7c72e3e0226209bd1a74bd1714a /src/main
parentc76898f2ab781b6206e41a11a2f5b59ed658c12d (diff)
Fixing lower case issue following acceptance test
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/musichub/util/Policy.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/main/java/musichub/util/Policy.java b/src/main/java/musichub/util/Policy.java
index 93e7caf..3d041d1 100644
--- a/src/main/java/musichub/util/Policy.java
+++ b/src/main/java/musichub/util/Policy.java
@@ -1,10 +1,5 @@
package musichub.util;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.StandardOpenOption;
-import java.sql.Timestamp;
import java.util.Scanner;
/**
@@ -111,8 +106,7 @@ public final class Policy {
printAgreement();
Scanner scan = new Scanner(System.in);
- String choice = scan.nextLine();
- choice = choice.toLowerCase();
+ String choice = scan.nextLine().toLowerCase();
while (!choice.equals("y")) {
switch (choice.charAt(0)) {
@@ -120,11 +114,11 @@ public final class Policy {
case 'r' -> {
System.out.println(termsAndConditions);
printAgreement();
- choice = scan.nextLine();
+ choice = scan.nextLine().toLowerCase();
}
default -> {
printAgreement();
- choice = scan.nextLine();
+ choice = scan.nextLine().toLowerCase();
}
}
}