Skip to content

Commit

Permalink
remove compiler warning
Browse files Browse the repository at this point in the history
relates to elastic#69
  • Loading branch information
costin committed Oct 31, 2013
1 parent 97ac095 commit 0096fa8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/org/elasticsearch/hadoop/rest/RestClient.java
Expand Up @@ -94,6 +94,7 @@ private <T> T parseContent(byte[] content, String string) throws IOException {
return (T) (string != null ? map.get(string) : map);
}

@SuppressWarnings("unchecked")
public void bulk(String index, byte[] buffer, int bufferSize) throws IOException {
//empty buffer, ignore
if (bufferSize == 0) {
Expand All @@ -114,8 +115,6 @@ public void bulk(String index, byte[] buffer, int bufferSize) throws IOException
Map<String, Object> map = mapper.readValue(jsonParser, Map.class);
List<Object> items = (List<Object>) map.get("items");

boolean failed = false;

for (Object item : items) {
Map<String, String> messages = (Map<String, String>) ((Map) item).values().iterator().next();
String message = messages.get("error");
Expand Down

0 comments on commit 0096fa8

Please sign in to comment.