From ba0643da2b333593e92d896e27ecb4490787029c Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 29 Sep 2015 16:45:57 +0200 Subject: [PATCH] Workaround JDK-8056984 This commit works around JDK bug JDK-8056984 in the javac compiler. This bug is impacting CI compilations on JDK 8u25. --- .../org/elasticsearch/index/query/AbstractQueryTestCase.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java b/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java index 93ac3b125c6..5837d5b16ff 100644 --- a/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java +++ b/core/src/test/java/org/elasticsearch/index/query/AbstractQueryTestCase.java @@ -435,7 +435,9 @@ public abstract class AbstractQueryTestCase> * Allows to override boost assertions for queries that don't have the default behaviour */ protected void assertBoost(QB queryBuilder, Query query) throws IOException { - assertThat(query.getBoost(), equalTo(queryBuilder.boost())); + // workaround https://bugs.openjdk.java.net/browse/JDK-8056984 + float boost = queryBuilder.boost(); + assertThat(query.getBoost(), equalTo(boost)); } /**