Skip to content
Snippets Groups Projects
Commit 9817a20d authored by Ondřej Hrdlička's avatar Ondřej Hrdlička
Browse files

Fixed equals

parent 7a6db860
No related branches found
No related tags found
2 merge requests!52Final project MR,!51M02review
...@@ -94,7 +94,7 @@ public class Category implements IdentifiableEntity { ...@@ -94,7 +94,7 @@ public class Category implements IdentifiableEntity {
return false; return false;
} }
Category category = (Category) o; Category category = (Category) o;
return Objects.equals(id, category.id); return this.id != null && this.id.equals(category.id);
} }
@Override @Override
......
...@@ -48,7 +48,7 @@ public class CategoryTime { ...@@ -48,7 +48,7 @@ public class CategoryTime {
return false; return false;
} }
CategoryTime that = (CategoryTime) o; CategoryTime that = (CategoryTime) o;
return Objects.equals(id, that.id); return this.id != null && this.id.equals(that.id);
} }
public void setHoursSpent(Long hoursSpent) { public void setHoursSpent(Long hoursSpent) {
......
...@@ -61,7 +61,7 @@ public class SubTask implements Completable, IdentifiableEntity { ...@@ -61,7 +61,7 @@ public class SubTask implements Completable, IdentifiableEntity {
return false; return false;
} }
SubTask subTask = (SubTask) o; SubTask subTask = (SubTask) o;
return Objects.equals(id, subTask.id); return this.id != null && this.id.equals(subTask.id);
} }
@Override @Override
......
...@@ -219,7 +219,7 @@ public class Task implements Completable, IdentifiableEntity { ...@@ -219,7 +219,7 @@ public class Task implements Completable, IdentifiableEntity {
return false; return false;
} }
Task task = (Task) o; Task task = (Task) o;
return Objects.equals(id, task.id); return this.id != null && this.id.equals(task.id);
} }
@Override @Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment