From 8a03988c030d07673a10742a01995ebb7b5ff97a Mon Sep 17 00:00:00 2001 From: Adrien Grand Date: Fri, 10 Jun 2016 18:57:09 +0200 Subject: [PATCH] Upgrade code for Lucene 6.1. Original commit: elastic/x-pack-elasticsearch@282299cebea1c65a4db9c571c585fc4caf37b4bd --- .../ShieldIndexSearcherWrapperUnitTests.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapperUnitTests.java b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapperUnitTests.java index 15a9de93d97..e1f74b3f8de 100644 --- a/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapperUnitTests.java +++ b/elasticsearch/x-pack/shield/src/test/java/org/elasticsearch/shield/authz/accesscontrol/ShieldIndexSearcherWrapperUnitTests.java @@ -468,6 +468,16 @@ public class ShieldIndexSearcherWrapperUnitTests extends ESTestCase { public Weight createWeight(IndexSearcher searcher, boolean needsScores) throws IOException { return new CreateScorerOnceWeight(query.createWeight(searcher, needsScores)); } + + @Override + public boolean equals(Object obj) { + return sameClassAs(obj) && query.equals(((CreateScorerOnceQuery) obj).query); + } + + @Override + public int hashCode() { + return 31 * classHash() + query.hashCode(); + } } public void doTestIndexSearcherWrapper(boolean sparse, boolean deletions) throws IOException {