Skip to content

Commit b6f3bbe

Browse files
authored
Merge pull request #3 from tensaida/branch-A-CodeQuality
Add a default branch in case statement
2 parents 65b6518 + 368916e commit b6f3bbe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/drake/Storage.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public Storage() throws IOException, DrakeException {
3939
*
4040
* @return A list of Tasks present in the task file.
4141
*/
42-
public List<Task> fileToList() {
42+
public List<Task> fileToList() throws UnknownCommandException {
4343
ArrayList<Task> list = new ArrayList<>();
4444
Scanner fileReader;
4545
try {
@@ -71,6 +71,8 @@ public List<Task> fileToList() {
7171
}
7272
list.add(event);
7373
break;
74+
default:
75+
throw new UnknownCommandException();
7476
}
7577
}
7678
return list;

0 commit comments

Comments
 (0)