You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/01/31 19:20:33 UTC
[maven] 01/01: Test for empty value and avoid needless space
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch avoid-empty-locations
in repository https://gitbox.apache.org/repos/asf/maven.git
commit 8df10f93be44d731ee0384cb21476e562e5f2300
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Jan 31 19:51:32 2021 +0100
Test for empty value and avoid needless space
---
.../main/java/org/apache/maven/exception/DefaultExceptionHandler.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
index 30b73f4..7d19818 100644
--- a/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
+++ b/maven-core/src/main/java/org/apache/maven/exception/DefaultExceptionHandler.java
@@ -149,7 +149,8 @@ public class DefaultExceptionHandler
}
String message = System.lineSeparator()
- + "The project " + result.getProjectId() + " (" + result.getPomFile() + ") has "
+ + "The project " + ( result.getProjectId().isEmpty() ? "" : result.getProjectId() + " " )
+ + "(" + result.getPomFile() + ") has "
+ children.size() + " error" + ( children.size() == 1 ? "" : "s" );
return new ExceptionSummary( null, message, null, children );