Fix potential NPE in RankEvalSpec roundtrip test

This commit is contained in:
Christoph Büscher 2016-11-15 20:53:51 +01:00
parent 3ebb226554
commit 6cc7fb5600
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ public class RankEvalSpecTests extends ESTestCase {
script = randomAsciiOfLengthBetween(1, 5);
}
testItem.setTemplate(new Script(scriptType, randomFrom("_lang1", "_lang2", null), script, params));
testItem.setTemplate(new Script(scriptType, randomFrom("_lang1", "_lang2"), script, params));
}
XContentBuilder shuffled = ESTestCase.shuffleXContent(testItem.toXContent(XContentFactory.jsonBuilder(), ToXContent.EMPTY_PARAMS));