You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2008/08/29 14:02:08 UTC
svn commit: r690197 -
/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
Author: vsiveton
Date: Fri Aug 29 05:02:08 2008
New Revision: 690197
URL: http://svn.apache.org/viewvc?rev=690197&view=rev
Log:
o defined a static unknown field
Modified:
maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
Modified: maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java?rev=690197&r1=690196&r2=690197&view=diff
==============================================================================
--- maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java (original)
+++ maven/plugins/trunk/maven-help-plugin/src/main/java/org/apache/maven/plugins/help/DescribeMojo.java Fri Aug 29 05:02:08 2008
@@ -74,6 +74,9 @@
/** The default indent size when writing description's Mojo. */
private static final int INDENT_SIZE = 2;
+ /** For unknown values */
+ private static final String UNKNOWN = "Unknown";
+
// ----------------------------------------------------------------------
// Mojo components
// ----------------------------------------------------------------------
@@ -751,8 +754,6 @@
append( buffer, "Expression", expression, 3 );
}
-
-
//append( buffer, "Required", parameter.isRequired() + "", 2 );
appendAsParagraph( buffer, null, toDescription( parameter.getDescription() ), 3 );
@@ -964,7 +965,7 @@
{
if ( StringUtils.isEmpty( description ) )
{
- sb.append( "Unknown" ).append( '\n' );
+ sb.append( UNKNOWN ).append( '\n' );
return;
}
@@ -996,7 +997,7 @@
if ( StringUtils.isEmpty( value ) )
{
- value = "Unknown";
+ value = UNKNOWN;
}
String description = key + ": " + value;
@@ -1022,10 +1023,9 @@
private static void appendAsParagraph( StringBuffer sb, String key, String value, int indent )
throws MojoFailureException, MojoExecutionException
{
-
if ( StringUtils.isEmpty( value ) )
{
- value = "Unknown";
+ value = UNKNOWN;
}
String description;