This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MNG-5760
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 473a35e1a43ec01637d345d5cfadbde5e16bca75
Author: Maarten Mulders <[email protected]>
AuthorDate: Mon May 25 15:39:50 2020 +0200

    Replace Stream#filter#count with Stream#anyMatch
---
 maven-core/src/main/java/org/apache/maven/DefaultMaven.java | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java 
b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
index a5e84f3..9f6c56f 100644
--- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
+++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java
@@ -366,11 +366,10 @@ public class DefaultMaven
 
     private void saveResumptionDataWhenApplicable( MavenExecutionResult 
result, MavenSession session )
     {
-        long lifecycleExecutionExceptionCount = result.getExceptions().stream()
-                .filter( LifecycleExecutionException.class::isInstance )
-                .count();
+        boolean hasLifecycleExecutionExceptions = 
result.getExceptions().stream()
+                .anyMatch( LifecycleExecutionException.class::isInstance );
 
-        if ( lifecycleExecutionExceptionCount > 0 )
+        if ( hasLifecycleExecutionExceptions )
         {
             session.getAllProjects().stream()
                     .filter( MavenProject::isExecutionRoot )

Reply via email to