You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2007/07/19 20:22:24 UTC
svn commit: r557720 -
/maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java
Author: dennisl
Date: Thu Jul 19 11:22:23 2007
New Revision: 557720
URL: http://svn.apache.org/viewvc?view=rev&rev=557720
Log:
o Fix errors reported by Checkstyle.
Modified:
maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java
Modified: maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java?view=diff&rev=557720&r1=557719&r2=557720
==============================================================================
--- maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java (original)
+++ maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java Thu Jul 19 11:22:23 2007
@@ -84,6 +84,11 @@
private static final String FILE_TOKEN = "%FILE%";
/**
+ * The number of days to use as a range, when this is not specified.
+ */
+ private static final int DEFAULT_RANGE = 30;
+
+ /**
* Used to specify the format to use for the dates in the headings of the
* report.
*
@@ -465,7 +470,8 @@
}
else if ( "tag".equals( type ) )
{
- if( repository.getProvider().equals( "svn" ) ) {
+ if ( repository.getProvider().equals( "svn" ) )
+ {
throw new MavenReportException( "The type '" + type + "' isn't supported for svn." );
}
@@ -751,7 +757,7 @@
{
if ( range == -1 )
{
- range = 30;
+ range = DEFAULT_RANGE;
}
}
else if ( "date".equals( type ) )
@@ -759,7 +765,8 @@
if ( dates == null )
{
throw new MavenReportException(
- "The dates parameter is required when type=\"date\". The value should be the absolute date for the start of the log." );
+ "The dates parameter is required when type=\"date\"."
+ + " The value should be the absolute date for the start of the log." );
}
}
else if ( "tag".equals( type ) )
@@ -927,7 +934,8 @@
else
{
sink.text( bundle.getString( "report.SetRangeBetween" ) );
- sink.text( " " + headingDateFormater.format( set.getStartDate() ) + " " + bundle.getString( "report.And" ) + " "
+ sink.text( " " + headingDateFormater.format( set.getStartDate() )
+ + " " + bundle.getString( "report.And" ) + " "
+ headingDateFormater.format( set.getEndDate() ) );
}
sink.sectionTitle2_();
@@ -1302,10 +1310,13 @@
String head;
String tail;
- if (pos < 0) {
+ if ( pos < 0 )
+ {
head = "";
tail = name;
- } else {
+ }
+ else
+ {
head = name.substring( 0, pos ) + "/";
tail = name.substring( pos + 1 );
}