Skip to content

Commit

Permalink
Merge pull request AY2324S2-CS2103T-F12-2#264 from bennyLCK/branch-b-…
Browse files Browse the repository at this point in the history
…CodeQuality

Delete all commented out codes
  • Loading branch information
bennyLCK authored Apr 15, 2024
2 parents a7efa35 + b2eb108 commit 2c56b7a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 37 deletions.
2 changes: 1 addition & 1 deletion docs/DeveloperGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ How the parsing works:
### Model component
**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)

<puml src="diagrams/ModelClassDiagram.puml" width="800" />
<puml src="diagrams/ModelClassDiagram.puml" width="1500" height="1000" />


The `Model` component,
Expand Down
1 change: 0 additions & 1 deletion docs/diagrams/ModelClassDiagram.puml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
skinparam arrowThickness 1.1
skinparam arrowColor MODEL_COLOR
skinparam classBackgroundColor MODEL_COLOR
scale 10


Package Model as ModelPackage <<Rectangle>>{
Expand Down
31 changes: 0 additions & 31 deletions src/main/java/seedu/address/model/article/UniqueArticleList.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ public boolean contains(Article toCheck) {
*/
public void add(Article toAdd) {
requireNonNull(toAdd);

/*
if (contains(toAdd)) {
throw new DuplicatePersonException();
}
*/

internalList.add(toAdd);
}

Expand All @@ -55,16 +47,6 @@ public void setArticle(Article target, Article editedArticle) {

int index = internalList.indexOf(target);

/*
if (index == -1) {
throw new PersonNotFoundException();
}
if (!target.isSameArticle(editedArticle) && contains(editedArticle)) {
throw new DuplicatePersonException();
}
*/

internalList.set(index, editedArticle);
}

Expand All @@ -74,12 +56,6 @@ public void setArticle(Article target, Article editedArticle) {
public void remove(Article toRemove) {
requireNonNull(toRemove);
internalList.remove(toRemove);

/*
if (!internalList.remove(toRemove)) {
throw new PersonNotFoundException();
}
*/
}

public void setArticles(UniqueArticleList replacement) {
Expand All @@ -93,13 +69,6 @@ public void setArticles(UniqueArticleList replacement) {
*/
public void setArticles(List<Article> articles) {
requireAllNonNull(articles);

/*
if (!personsAreUnique(persons)) {
throw new DuplicatePersonException();
}
*/

internalList.setAll(articles);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public NameWithinArticlePredicate(Article article) {

@Override
public boolean test(Person person) {
/*return article.getAuthors().stream()
.anyMatch(author -> person.getName().fullName.equals(author.authorName)) ||
article.getSources().stream()
.anyMatch(source -> person.getName().fullName.equals(source.sourceName));*/
return article.getPersons().contains(person);
}

Expand Down

0 comments on commit 2c56b7a

Please sign in to comment.