[
https://issues.apache.org/jira/browse/EAGLE-1012?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15992384#comment-15992384
]
ASF GitHub Bot commented on EAGLE-1012:
---------------------------------------
Github user asdf2014 commented on a diff in the pull request:
https://github.com/apache/eagle/pull/925#discussion_r114254151
--- 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 think it will bring better maintainability and
[performance](http://blog.takipi.com/benchmark-how-java-8-lambdas-and-streams-can-make-your-code-5-times-slower/).
> Some language level problems
> ----------------------------
>
> Key: EAGLE-1012
> URL: https://issues.apache.org/jira/browse/EAGLE-1012
> Project: Eagle
> Issue Type: Bug
> Components: Project Infrastructure
> Affects Versions: v0.4.0
> Environment: Linux 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36
> EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
> Reporter: Benedict Jin
> Labels: JDK
> Fix For: v0.6.0
>
> Attachments: Eagle Language Level Problems.txt
>
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> Some language level problems
> * Spell
> * Duplicated
> * Lambda
> * Collection
> * String
> * instanceof
> * Complex Method
> * Exception
> Details see attachment files.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)