Github user duchuyctlk commented on a diff in the pull request: https://github.com/apache/incubator-metron/pull/483#discussion_r106813691 --- Diff: metron-platform/metron-enrichment/src/main/java/org/apache/metron/enrichment/bolt/EnrichmentSplitterBolt.java --- @@ -61,16 +61,20 @@ public void prepare(Map map, TopologyContext topologyContext) { } @Override public String getKey(Tuple tuple, JSONObject message) { - String key = null; + String key = null, guid = null; try { key = tuple.getStringByField("key"); + guid = (String)message.get(Constants.GUID); } catch(Throwable t) { //swallowing this just in case. } if(key != null) { --- End diff -- Can ternary simplify this `if-else` statement? ```java return key != null ? key : (guid != null : guid : UUID.randomUUID().toString()); ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---