-
Notifications
You must be signed in to change notification settings - Fork 437
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
base: master
Are you sure you want to change the base?
Conversation
branch-A-Assertions
branch-A-CodeQuality
branch-C-Sort
src/main/java/duke/DialogBox.java
Outdated
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; |
There was a problem hiding this comment.
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.
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?"); |
There was a problem hiding this comment.
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..."); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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. | |||
*/ |
There was a problem hiding this comment.
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.
No description provided.