[MRM-353] fix for divide by zero error...

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@541112 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jesse McConnell 2007-05-23 22:52:51 +00:00
parent 503dc28855
commit 6473f82940
1 changed files with 8 additions and 1 deletions

View File

@ -2206,7 +2206,14 @@
}
buf.append( "\n Total File Count : " ).append( this.getTotalFileCount() );
long averageMsPerFile = ( this.getDuration() / this.getTotalFileCount() );
long averageMsPerFile = 0;
if ( this.totalFileCount != 0 )
{
averageMsPerFile = ( this.getDuration() / this.getTotalFileCount() );
}
buf.append( "\n Avg Time Per File : " );
buf.append( org.apache.maven.archiva.common.utils.DateUtil.getDuration( averageMsPerFile ) );
buf.append( "\n______________________________________________________________" );