use equals instead of ==

(cherry picked from commit 80de8f6fb5)
This commit is contained in:
Sascha Szott
2024-08-02 17:44:35 +02:00
committed by github-actions[bot]
parent 275b0f89b7
commit b8f638b3b6

View File

@@ -64,7 +64,7 @@ public class EntityServiceImpl implements EntityService {
List<Relationship> fullList = entity.getRelationships();
List<Relationship> listToReturn = new LinkedList<>();
for (Relationship relationship : fullList) {
if (relationship.getLeftItem().getID() == entity.getItem().getID()) {
if (relationship.getLeftItem().getID().equals(entity.getItem().getID())) {
listToReturn.add(relationship);
}
}
@@ -76,7 +76,7 @@ public class EntityServiceImpl implements EntityService {
List<Relationship> fullList = entity.getRelationships();
List<Relationship> listToReturn = new LinkedList<>();
for (Relationship relationship : fullList) {
if (relationship.getRightItem().getID() == entity.getItem().getID()) {
if (relationship.getRightItem().getID().equals(entity.getItem().getID())) {
listToReturn.add(relationship);
}
}