[GitHub] akalash commented on a change in pull request #3: IGNITE-9333 Add statistics page

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] akalash commented on a change in pull request #3: IGNITE-9333 Add statistics page

GitBox
akalash commented on a change in pull request #3: IGNITE-9333 Add statistics page
URL: https://github.com/apache/ignite-teamcity-bot/pull/3#discussion_r214726174
 
 

 ##########
 File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 ##########
 @@ -290,14 +298,16 @@ private IgnitePersistentTeamcity(Ignite ignite, IgniteTeamcityHelper teamcity) {
 
                 return mergeByIdToHistoricalOrder(persistedValue, builds);
             });
+
+        return buildRefs.stream().skip(cnt < buildRefs.size() ? buildRefs.size() - cnt : 0).collect(Collectors.toList());
     }
 
     @NotNull
     private List<BuildRef> mergeByIdToHistoricalOrder(List<BuildRef> persistedVal, List<BuildRef> mostActualVal) {
         final SortedMap<Integer, BuildRef> merge = new TreeMap<>();
 
         if (persistedVal != null)
-            persistedVal.forEach(b -> merge.put(b.getId(), b));
+            persistedVal.stream().forEach(b -> merge.put(b.getId(), b));
 
 Review comment:
   For what? It is same but longer, isn't it?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services