Skip to content

Commit

Permalink
Fixing level 8 branch issue and detect duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavzzz committed Sep 19, 2022
1 parent a8245a2 commit b98175d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/Duke/commands/DetectDuplicateCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class DetectDuplicateCommands extends Command {
public List<String> execute(TaskList tasks, Ui ui, Storage storage) throws IOException, DukeException {
int counter = 0;
ArrayList<String> text = new ArrayList<>();
for (int i = 0; i < tasks.getTaskListSize(); i++) {
for (int i = 0; i < tasks.getTaskListSize() -1 ; i++) {
for (int j = i + 1; j < tasks.getTaskListSize(); j++) {
if (tasks.getTask(i) == tasks.getTask(j)) {
text.add("There seems to be a duplicate task in your planner");
Expand Down

0 comments on commit b98175d

Please sign in to comment.