Github user justinleet commented on a diff in the pull request:
https://github.com/apache/metron/pull/763#discussion_r139225095
--- Diff:
metron-platform/metron-elasticsearch/src/main/java/org/apache/metron/elasticsearch/dao/ElasticsearchMetaAlertDao.java
---
@@ -275,13 +275,13 @@ protected Document
buildCreateDocument(MultiGetResponse multiGetResponse, List<S
alertList.add(response.getSource());
}
}
- metaSource.put(ALERT_FIELD, alertList.toArray());
+ metaSource.put(ALERT_FIELD, alertList);
--- End diff --
If you look at the first two commits, they were originally to do the JIRA
as noted (handle both). The solution of the last commit is to just not use
arrays at all. In actuality though, both constructions of the alert field are
controlled by the DAO itself, so there's no reason to use arrays at all.
Basically, this PR solves the underlying problem (The two paths used
different types), rather than the symptom (That two different types went into
the same method).
---