Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Jonah Tan Jun Zi] iP #62

Open
wants to merge 92 commits into
base: master
Choose a base branch
from

Conversation

jonahtanjz
Copy link

No description provided.

Comment on lines 3 to 15
import java.io.IOException;
import java.util.Collections;

import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.control.Label;
import javafx.scene.layout.HBox;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.HBox;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While it is great that you grouped the respective import statements, appropriate spacing could make it easier to browse the list and determine the dependencies, especially since there are many imports.

Comment on lines +108 to +120
case "task.Todo":
taskString = taskString + "T";
break;
case "task.Deadline":
taskString = taskString + "D";
timing = timing + ((Deadline) task).getTiming();
break;
case "task.Event":
taskString = taskString + "E";
timing = timing + ((Event) task).getTiming();
break;
default:
throw new MissingInfoException("Something wrong with your function parameter?");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation for case and default clauses should be removed.

@@ -62,12 +74,7 @@ public void load(TaskList taskList) throws IOException, MissingInfoException {
break;
default:
throw new MissingInfoException("There is something wrong with your database file...");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation for case and default clauses should be removed.

if (!directory.exists()) {
directory.mkdir();
}
File file = new File(this.pathname);
Copy link

@rnmy rnmy Sep 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be an unnecessary use of the "this" keyword. In general, try to use "this" only when a field is shadowed by a method or constructor parameter.

@@ -29,8 +31,8 @@ public Storage(String pathname) {
* @param taskList A TaskList with no tasks.
* @throws IOException If file is not found or error reading file.
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good to declare that the MissingInfoException is being thrown in the javaDoc for the load method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants