Add generic type and suppress warnings to test

Original commit: elastic/x-pack-elasticsearch@b454af89bd
This commit is contained in:
Simon Willnauer 2016-01-20 09:21:05 +01:00
parent 471ee7d867
commit a30c6c2780
3 changed files with 5 additions and 3 deletions

View File

@ -8,6 +8,7 @@ package org.elasticsearch.messy.tests;
import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptRequest; import org.elasticsearch.action.indexedscripts.put.PutIndexedScriptRequest;
import org.elasticsearch.action.search.SearchRequest; import org.elasticsearch.action.search.SearchRequest;
import org.elasticsearch.action.search.SearchType; import org.elasticsearch.action.search.SearchType;
import org.elasticsearch.common.collect.HppcMaps;
import org.elasticsearch.common.io.Streams; import org.elasticsearch.common.io.Streams;
import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.unit.TimeValue;

View File

@ -176,6 +176,7 @@ public class SearchTransformTests extends ESIntegTestCase {
assertThat(resultData, equalTo(expectedData)); assertThat(resultData, equalTo(expectedData));
} }
@SuppressWarnings("unchecked")
public void testExecuteFailure() throws Exception { public void testExecuteFailure() throws Exception {
index("idx", "type", "1"); index("idx", "type", "1");
ensureGreen("idx"); ensureGreen("idx");

View File

@ -170,15 +170,15 @@ public class TextTemplate implements ToXContent {
return new Builder.Inline(template.bytes().toUtf8()).contentType(template.contentType()); return new Builder.Inline(template.bytes().toUtf8()).contentType(template.contentType());
} }
public static Builder inline(String text) { public static Builder<Builder.Inline> inline(String text) {
return new Builder.Inline(text); return new Builder.Inline(text);
} }
public static Builder file(String file) { public static Builder<Builder.File> file(String file) {
return new Builder.File(file); return new Builder.File(file);
} }
public static Builder indexed(String id) { public static Builder<Builder.Indexed> indexed(String id) {
return new Builder.Indexed(id); return new Builder.Indexed(id);
} }