eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jhsenjaliya <...@git.apache.org>
Subject [GitHub] eagle pull request #925: [EAGLE-1012] Some language level problems in `eagle...
Date Tue, 02 May 2017 06:02:09 GMT
Github user jhsenjaliya commented on a diff in the pull request:

    https://github.com/apache/eagle/pull/925#discussion_r114253102
  
    --- Diff: eagle-core/eagle-alert-parent/eagle-alert/alert-engine/src/main/java/org/apache/eagle/alert/engine/publisher/impl/AlertEagleStorePlugin.java
---
    @@ -62,10 +60,9 @@ public void onAlert(AlertStreamEvent event) throws Exception {
             if (eventList == null || eventList.isEmpty()) {
                 return;
             }
    -        List<AlertPublishEvent> alertEvents = new ArrayList<>();
    -        for (AlertStreamEvent e : eventList) {
    -            alertEvents.add(AlertPublishEvent.createAlertPublishEvent(e));
    -        }
    +        List<AlertPublishEvent> alertEvents = eventList.stream().map(
    --- End diff --
    
    i feel its fancy to use newer java features, but old syntax is more readable, may be its
just a coding preference


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message