Commit f91133b7 authored by Magnus Schjølberg's avatar Magnus Schjølberg
Browse files

Fix mistake in Item equals-method

parent 498b0107
......@@ -41,7 +41,7 @@ public class Item {
public boolean equals(Object other) {
if (other instanceof Item) {
Item otherItem = (Item) other;
return this.name.equals(getName()) && this.price == otherItem.getPrice()
return this.name.equals(otherItem.getName()) && this.price == otherItem.getPrice()
&& this.category.equals(otherItem.getCategory());
}
return false;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment