You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/05/23 19:41:17 UTC

[GitHub] [maven] michael-o commented on a change in pull request #342: [MNG-5760] Add --resume / -r switch

michael-o commented on a change in pull request #342:
URL: https://github.com/apache/maven/pull/342#discussion_r429572738



##########
File path: maven-core/src/main/java/org/apache/maven/DefaultMaven.java
##########
@@ -366,20 +366,21 @@ private void afterSessionEnd( Collection<MavenProject> projects, MavenSession se
 
     private void saveResumptionDataWhenApplicable( MavenExecutionResult result, MavenSession session )
     {
-        List<LifecycleExecutionException> lifecycleExecutionExceptions = result.getExceptions().stream()
+        long lifecycleExecutionExceptionCount = result.getExceptions().stream()
                 .filter( LifecycleExecutionException.class::isInstance )
-                .map( LifecycleExecutionException.class::cast )
-                .collect( Collectors.toList() );
+                .count();

Review comment:
       Why do we need a stream to count elements?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org