]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.structural2/src/org/simantics/structural2/scl/CompileProceduralExpressionValueRequest.java
Add missing relation field when computing hashCode/equals
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / scl / CompileProceduralExpressionValueRequest.java
index b402520d74cbe0bb5487e2d96ed15c35c8196af6..27e4a6f3bee5e5e006ca6be1e9c85f129f29db28 100644 (file)
@@ -63,6 +63,7 @@ public class CompileProceduralExpressionValueRequest extends AbstractCompileStru
     public int hashCode() {
         final int prime = 31;
         int result = 1;
+        result = prime * result + ((relation == null) ? 0 : relation.hashCode());
         result = prime * result + ((componentType == null) ? 0 : componentType.hashCode());
         result = prime * result + ((expression == null) ? 0 : expression.hashCode());
         result = prime * result + ((indexRoot == null) ? 0 : indexRoot.hashCode());
@@ -78,6 +79,11 @@ public class CompileProceduralExpressionValueRequest extends AbstractCompileStru
         if (getClass() != obj.getClass())
             return false;
         CompileProceduralExpressionValueRequest other = (CompileProceduralExpressionValueRequest) obj;
+        if (relation == null) {
+            if (other.relation != null)
+                return false;
+        } else if (!relation.equals(other.relation))
+            return false;
         if (componentType == null) {
             if (other.componentType != null)
                 return false;