aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/search/federation
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@yahoo-inc.com>2016-08-15 14:53:04 +0200
committerJon Bratseth <bratseth@yahoo-inc.com>2016-08-15 14:53:04 +0200
commit7ce10b163402ec030e066111527d4cddf17c1401 (patch)
tree6079de594ddc26c8a066df1aa16f0d4872cdeb88 /container-search/src/main/java/com/yahoo/search/federation
parent5533fcc881d516bf8e67ea6492ad6dc2174c6dd8 (diff)
Nonfunctional changes
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/federation')
-rw-r--r--container-search/src/main/java/com/yahoo/search/federation/FederationSearcher.java6
-rw-r--r--container-search/src/main/java/com/yahoo/search/federation/sourceref/SearchChainInvocationSpec.java6
2 files changed, 4 insertions, 8 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/federation/FederationSearcher.java b/container-search/src/main/java/com/yahoo/search/federation/FederationSearcher.java
index 7196a392388..e6344e39fed 100644
--- a/container-search/src/main/java/com/yahoo/search/federation/FederationSearcher.java
+++ b/container-search/src/main/java/com/yahoo/search/federation/FederationSearcher.java
@@ -112,13 +112,13 @@ public class FederationSearcher extends ForkingSearcher {
if ( ! ( o instanceof StandardTargetHandler)) return false;
StandardTargetHandler other = (StandardTargetHandler)o;
- if ( ! other.chain.getId().equals(this.chain.getId())) return false;
- if ( ! other.target.equals(this.target)) return false;
+ if ( ! Objects.equals(other.chain.getId(), this.chain.getId())) return false;
+ if ( ! Objects.equals(other.target, this.target)) return false;
return true;
}
@Override
- public int hashCode() { return chain.getId().hashCode() + 11 * target.hashCode(); }
+ public int hashCode() { return Objects.hash(chain.getId().hashCode(), target.hashCode()); }
}
diff --git a/container-search/src/main/java/com/yahoo/search/federation/sourceref/SearchChainInvocationSpec.java b/container-search/src/main/java/com/yahoo/search/federation/sourceref/SearchChainInvocationSpec.java
index c4d168af085..db997ea4339 100644
--- a/container-search/src/main/java/com/yahoo/search/federation/sourceref/SearchChainInvocationSpec.java
+++ b/container-search/src/main/java/com/yahoo/search/federation/sourceref/SearchChainInvocationSpec.java
@@ -57,11 +57,7 @@ public class SearchChainInvocationSpec implements Cloneable {
@Override
public int hashCode() {
- return searchChainId.hashCode() +
- (source != null ? 3 * source.hashCode() : 0) +
- (provider != null ? 5 * provider.hashCode(): 0) +
- federationOptions.hashCode() +
- documentTypes.hashCode();
+ return Objects.hash(searchChainId, source, provider, federationOptions, documentTypes);
}
}