Skip to content

Commit

Permalink
Correct the default false value of isComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
SukiTsang committed Oct 19, 2016
1 parent 07eaba7 commit 4284d41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/main/java/seedu/task/model/task/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public Task(Name name, UniqueTagList tags,boolean isCompleted) {
//this.openTime = openTime;
//this.closeTime = closeTime;
//this.isImportant = isImportant;
this.tags = new UniqueTagList(tags);
this.isCompleted=false; // protect internal tags from changes in the arg list
this.tags = new UniqueTagList(tags); // protect internal tags from changes in the arg list
this.isCompleted= isCompleted;
}

/**
* Copy constructor.
*/
public Task(ReadOnlyTask source) {
this(source.getName(), source.getTags(),source.getComplete());
this(source.getName(), source.getTags(), source.getComplete());
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/seedu/task/storage/XmlAdaptedTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public XmlAdaptedTask(ReadOnlyTask source) {
tagged = new ArrayList<>();
for (Tag tag : source.getTags()) {
tagged.add(new XmlAdaptedTag(tag));
isComplete=source.getComplete();
isComplete= source.getComplete();
}
}

Expand All @@ -66,7 +66,7 @@ public Task toModelType() throws IllegalValueException {
// final DateTime closeTime = new DateTime(this.closeTime);
// final boolean isImportant = this.isImportant;
final UniqueTagList tags = new UniqueTagList(taskTags);
final boolean isComplete=false;
return new Task(name, tags,isComplete); //(name, openTime, closeTime, isImportant, tags)
final boolean isComplete= this.isComplete;
return new Task(name, tags, isComplete); //(name, openTime, closeTime, isImportant, tags)
}
}

0 comments on commit 4284d41

Please sign in to comment.