aboutsummaryrefslogtreecommitdiffstats
path: root/application-model
diff options
context:
space:
mode:
authorHåkon Hallingstad <hakon@oath.com>2017-10-25 17:41:39 +0200
committerHåkon Hallingstad <hakon@oath.com>2017-10-25 17:41:39 +0200
commit935c7d664cb2a0c8ce09da3e417e95ef8d3657ff (patch)
treecf1661a7d5fa3e55e2bcdcb2089542dc8a11d0f6 /application-model
parent37ce355370e8483c05bd9a7ce9f4f248e19ad4fb (diff)
Avoid recursive hashCode and equals
Diffstat (limited to 'application-model')
-rw-r--r--application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceCluster.java5
-rw-r--r--application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceInstance.java5
2 files changed, 4 insertions, 6 deletions
diff --git a/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceCluster.java b/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceCluster.java
index e53058f40e3..925527d2732 100644
--- a/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceCluster.java
+++ b/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceCluster.java
@@ -70,12 +70,11 @@ public class ServiceCluster {
ServiceCluster that = (ServiceCluster) o;
return Objects.equals(clusterId, that.clusterId) &&
Objects.equals(serviceType, that.serviceType) &&
- Objects.equals(serviceInstances, that.serviceInstances) &&
- Objects.equals(applicationInstance, that.applicationInstance);
+ Objects.equals(serviceInstances, that.serviceInstances);
}
@Override
public int hashCode() {
- return Objects.hash(clusterId, serviceType, serviceInstances, applicationInstance);
+ return Objects.hash(clusterId, serviceType, serviceInstances);
}
}
diff --git a/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceInstance.java b/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceInstance.java
index 4c802218b22..37d802406d1 100644
--- a/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceInstance.java
+++ b/application-model/src/main/java/com/yahoo/vespa/applicationmodel/ServiceInstance.java
@@ -65,12 +65,11 @@ public class ServiceInstance {
ServiceInstance that = (ServiceInstance) o;
return Objects.equals(configId, that.configId) &&
Objects.equals(hostName, that.hostName) &&
- serviceStatus == that.serviceStatus &&
- Objects.equals(serviceCluster, that.serviceCluster);
+ serviceStatus == that.serviceStatus;
}
@Override
public int hashCode() {
- return Objects.hash(configId, hostName, serviceStatus, serviceCluster);
+ return Objects.hash(configId, hostName, serviceStatus);
}
}