You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2019/02/22 18:36:39 UTC
[maven-help-plugin] branch MPH-160 updated: [MPH-160] display line
number only if meaningful
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch MPH-160
in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git
The following commit(s) were added to refs/heads/MPH-160 by this push:
new dafd6ac [MPH-160] display line number only if meaningful
dafd6ac is described below
commit dafd6ac12fd2f2285b3035c20edd1dc9cef99855
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Fri Feb 22 19:36:38 2019 +0100
[MPH-160] display line number only if meaningful
---
src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java b/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
index ccf679f..ae9a455 100644
--- a/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
+++ b/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java
@@ -265,7 +265,7 @@ public class EffectivePomMojo
s = source.toString();
}
- return '}' + s + ", line " + location.getLineNumber() + ' ';
+ return '}' + s + ( ( location.getLineNumber() >= 0 ) ? ", line " + location.getLineNumber() : "" ) + ' ';
}
}
}