Skip to content
Snippets Groups Projects
Commit 1440b1d3 authored by felmer's avatar felmer
Browse files

SSDM-7708: missing adaption in EntityGraph, Node.equals() simplified

parent 750b507e
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,7 @@ public class EntityGraph<N extends INode> ...@@ -118,7 +118,7 @@ public class EntityGraph<N extends INode>
for (INode node : getNodes()) for (INode node : getNodes())
{ {
List<EdgeNodePair> list = adjacencyMap.get(node); List<EdgeNodePair> list = adjacencyMap.get(node);
if (list.isEmpty() && node.getEntityKind().equals("DATA_SET") == false) if (list.isEmpty() && node.getEntityKind().equals(SyncEntityKind.DATA_SET) == false)
{ {
sb.append(getRightHandNodeRep(node, forTest)); sb.append(getRightHandNodeRep(node, forTest));
// if(node.getEntityKind().equals("PROJECT")) { // if(node.getEntityKind().equals("PROJECT")) {
......
...@@ -75,27 +75,14 @@ public class Node<T extends IModificationDateHolder & IModifierHolder & IRegistr ...@@ -75,27 +75,14 @@ public class Node<T extends IModificationDateHolder & IModifierHolder & IRegistr
public boolean equals(Object obj) public boolean equals(Object obj)
{ {
if (this == obj) if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Node<?> other = (Node<?>) obj;
if (entity == null)
{ {
if (other.entity != null) return true;
{
return false;
}
} else if (this.getIdentifier().equals(other.getIdentifier()) == false)
{
return false;
} }
else if (getEntityKind().equals(other.getEntityKind()) == false) if (obj instanceof Node == false)
{ {
return false; return false;
} }
return true; return this.getIdentifier().equals(((Node<?>) obj).getIdentifier());
} }
@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