summaryrefslogtreecommitdiffstats
path: root/archiva-base
diff options
context:
space:
mode:
authorJesse McConnell <jmcconnell@apache.org>2007-05-23 22:52:51 +0000
committerJesse McConnell <jmcconnell@apache.org>2007-05-23 22:52:51 +0000
commit6473f829400a66cb8ecb9d7d1ab7b7d0f9965fb6 (patch)
treeefab9169639e22fed39a1cd92511137943172637 /archiva-base
parent503dc28855d77ea6a40f165a5446043beee9b86e (diff)
downloadarchiva-6473f829400a66cb8ecb9d7d1ab7b7d0f9965fb6.tar.gz
archiva-6473f829400a66cb8ecb9d7d1ab7b7d0f9965fb6.zip
[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
Diffstat (limited to 'archiva-base')
-rw-r--r--archiva-base/archiva-model/src/main/mdo/archiva-base.xml9
1 files changed, 8 insertions, 1 deletions
diff --git a/archiva-base/archiva-model/src/main/mdo/archiva-base.xml b/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
index 16bd14693..da0f0b2f2 100644
--- a/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
+++ b/archiva-base/archiva-model/src/main/mdo/archiva-base.xml
@@ -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______________________________________________________________" );