fix build errors
This commit is contained in:
parent
b0836d5d07
commit
2b26381c08
|
@ -18,7 +18,7 @@
|
|||
<elasticsearch.plugin.classname>org.elasticsearch.plugin.ingest.IngestPlugin</elasticsearch.plugin.classname>
|
||||
<tests.rest.suite>ingest</tests.rest.suite>
|
||||
<tests.rest.load_packaged>false</tests.rest.load_packaged>
|
||||
<xlint.options>-Xlint:-rawtypes</xlint.options>
|
||||
<xlint.options>-Xlint:-rawtypes,-unchecked</xlint.options>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -72,7 +72,7 @@ public final class Data {
|
|||
if (!inner.containsKey(pathElements[i])) {
|
||||
inner.put(pathElements[i], new HashMap<String, Object>());
|
||||
}
|
||||
inner = (HashMap<String, Object>) inner.get(pathElements[i]);
|
||||
inner = (Map<String, Object>) inner.get(pathElements[i]);
|
||||
}
|
||||
|
||||
inner.put(writeKey, value);
|
||||
|
|
|
@ -23,6 +23,7 @@ import org.elasticsearch.test.ESTestCase;
|
|||
import org.junit.Before;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
|
@ -32,13 +33,12 @@ public class DataTests extends ESTestCase {
|
|||
|
||||
@Before
|
||||
public void setData() {
|
||||
data = new Data("index", "type", "id",
|
||||
new HashMap<String, Object>() {{
|
||||
put("foo", "bar");
|
||||
put("fizz", new HashMap<String, Object>() {{
|
||||
put("buzz", "hello world");
|
||||
}});
|
||||
}});
|
||||
Map<String, Object> document = new HashMap<>();
|
||||
document.put("foo", "bar");
|
||||
Map<String, Object> innerObject = new HashMap<>();
|
||||
innerObject.put("buzz", "hello world");
|
||||
document.put("fizz", innerObject);
|
||||
data = new Data("index", "type", "id", document);
|
||||
}
|
||||
|
||||
public void testSimpleGetProperty() {
|
||||
|
|
Loading…
Reference in New Issue