From a30c6c2780c9666b86159a17545e7e0e008ac569 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Wed, 20 Jan 2016 09:21:05 +0100 Subject: [PATCH] Add generic type and suppress warnings to test Original commit: elastic/x-pack-elasticsearch@b454af89bd9b7e71ee09c588eeef7cea7bc40b1c --- .../org/elasticsearch/messy/tests/SearchInputTests.java | 1 + .../org/elasticsearch/messy/tests/SearchTransformTests.java | 1 + .../elasticsearch/watcher/support/text/TextTemplate.java | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputTests.java b/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputTests.java index c74b451a02b..ab36b54b372 100644 --- a/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputTests.java +++ b/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchInputTests.java @@ -8,6 +8,7 @@ package org.elasticsearch.messy.tests; import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptRequest; import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchType; +import org.elasticsearch.common.collect.HppcMaps; import org.elasticsearch.common.io.Streams; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.unit.TimeValue; diff --git a/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchTransformTests.java b/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchTransformTests.java index 812a9e5c801..89410804e58 100644 --- a/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchTransformTests.java +++ b/elasticsearch/qa/messy-test-xpack-with-mustache/src/test/java/org/elasticsearch/messy/tests/SearchTransformTests.java @@ -176,6 +176,7 @@ public class SearchTransformTests extends ESIntegTestCase { assertThat(resultData, equalTo(expectedData)); } + @SuppressWarnings("unchecked") public void testExecuteFailure() throws Exception { index("idx", "type", "1"); ensureGreen("idx"); diff --git a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/TextTemplate.java b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/TextTemplate.java index b65aaad1269..5a5e1b6653e 100644 --- a/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/TextTemplate.java +++ b/elasticsearch/x-pack/watcher/src/main/java/org/elasticsearch/watcher/support/text/TextTemplate.java @@ -170,15 +170,15 @@ public class TextTemplate implements ToXContent { return new Builder.Inline(template.bytes().toUtf8()).contentType(template.contentType()); } - public static Builder inline(String text) { + public static Builder inline(String text) { return new Builder.Inline(text); } - public static Builder file(String file) { + public static Builder file(String file) { return new Builder.File(file); } - public static Builder indexed(String id) { + public static Builder indexed(String id) { return new Builder.Indexed(id); }