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:
[email protected]


Reply via email to