Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/pony/Pony.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public class Pony {
* @param filePath File path of the memory file.
*/
public Pony(String filePath) {
assert filePath != null : "File path should not be empty";
ui = new Ui();
storage = new Storage(filePath);
tasks = new TaskList(storage.loadTaskList());
Expand Down
1 change: 1 addition & 0 deletions src/main/java/pony/TaskList.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public Task getTask(int index) throws PonyException {
if (index < 0 || index >= sizeOf()) {
throw new PonyException("Task index invalid!!");
}
assert index < sizeOf() && index >= 0 : "Task index should be valid";
return tasks.get(index);
}

Expand Down