diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-08-28 13:31:06 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2017-08-28 13:31:06 +0200 |
commit | 82049904c1ae9235eab7d11027dc85919819bee9 (patch) | |
tree | b1128918748f435664d2e344d4d9787d573cb61a /config-provisioning | |
parent | 37fc005dc97351dfdcec2dc283f128befe91e04a (diff) |
Track API changes, remove warnings
Diffstat (limited to 'config-provisioning')
-rw-r--r-- | config-provisioning/src/main/java/com/yahoo/config/provision/HostSpec.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/config-provisioning/src/main/java/com/yahoo/config/provision/HostSpec.java b/config-provisioning/src/main/java/com/yahoo/config/provision/HostSpec.java index a94660e142e..dd8bc311939 100644 --- a/config-provisioning/src/main/java/com/yahoo/config/provision/HostSpec.java +++ b/config-provisioning/src/main/java/com/yahoo/config/provision/HostSpec.java @@ -10,8 +10,7 @@ import java.util.Optional; /** * A specification of a host and its role. - * This is a value object: Immutable and the identity is determined by all the content. - * Host specs are ordered by host name. + * Equality and order is determined by the host name. * * @author hmusum */ @@ -71,21 +70,16 @@ public class HostSpec implements Comparable<HostSpec> { } @Override - public boolean equals(Object o) { - if (o == this) return true; - if ( ! (o instanceof HostSpec)) return false; - - HostSpec other = (HostSpec) o; - if ( ! this.hostname.equals(other.hostname)) return false; - if ( ! this.aliases.equals(other.aliases)) return false; - if ( ! this.membership.equals(other.membership)) return false; - if ( ! this.flavor.equals(other.flavor)) return false; - return true; + public boolean equals(Object other) { + if (other == this) return true; + if ( ! (other instanceof HostSpec)) return false; + + return ((HostSpec)other).hostname.equals(this.hostname); } @Override public int hashCode() { - return Objects.hash(hostname, aliases, membership, flavor); + return hostname.hashCode(); } @Override |