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

[W5.7][F11-4]Ng Yuan Yun Nigel #445

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/seedu/addressbook/data/AddressBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public UniquePersonList getAllPersons() {
* Returns a new UniquePersonList of all persons in the address book at the time of the call sorted in alphabetical order.
*/
public UniquePersonList getSortedAllPersons() {
return new UniquePersonList(allPersons).sort();
UniquePersonList toSort = new UniquePersonList(allPersons);
return toSort.sort();

Choose a reason for hiding this comment

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

Doesn't update the main list of persons? Only sort the new list created (the copy of the main list)?

}

@Override
Expand Down