From ea4dc91914e56411eda34a60bc61afc3efbc3216 Mon Sep 17 00:00:00 2001 From: top19 Date: Fri, 1 May 2020 09:36:48 +0100 Subject: [PATCH] Fixed the issue where you can add the same word twice. --- .../java/uk/ac/aber/cs221/group20/json/DictionaryEntry.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/json/DictionaryEntry.java b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/json/DictionaryEntry.java index 58eb034..705212b 100644 --- a/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/json/DictionaryEntry.java +++ b/src/Welsh Vocabulary Tutor/src/main/java/uk/ac/aber/cs221/group20/json/DictionaryEntry.java @@ -99,8 +99,8 @@ public class DictionaryEntry { @Override public boolean equals(Object entry) { DictionaryEntry otherEntry = (DictionaryEntry) entry; - return otherEntry.getEnglish().equals(this.getEnglish()) && - otherEntry.getWelsh().equals(this.getWelsh()) && + return otherEntry.getEnglish().equalsIgnoreCase(this.getEnglish()) && + otherEntry.getWelsh().equalsIgnoreCase(this.getWelsh()) && otherEntry.getWordType().equals(this.getWordType()); } }