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 18:52:08 UTC
[maven] branch avoid-empty-locations updated: 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
The following commit(s) were added to refs/heads/avoid-empty-locations by this push:
new 36352b0 Test for empty value and avoid needless space
36352b0 is described below
commit 36352b0bbb3b41013592f1e38ce46714fa098f2b
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..fae10f4 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 );