Apply MAVEN-967
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114228 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
000ac51c02
commit
0f47a0ca21
3 files changed
+18
-6
No files matched your search
@@ -72,7 +72,7 @@ import org.apache.oro.text.perl.Perl5Util;
|
||||
|
||||
/**
|
||||
* @author Emmanuel Venisse
|
||||
* @version $Id: CoverageReport.java,v 1.5 2003/09/09 15:52:57 evenisse Exp $
|
||||
* @version $Id: CoverageReport.java,v 1.6 2003/10/24 15:26:20 evenisse Exp $
|
||||
*/
|
||||
public class CoverageReport
|
||||
{
|
||||
@@ -492,7 +492,15 @@ public class CoverageReport
|
||||
{
|
||||
percentValue = percentValue.substring(0, percentValue.length() - 1);
|
||||
}
|
||||
double rest = 100d - new Double(percentValue).doubleValue();
|
||||
double rest = 0;
|
||||
try
|
||||
{
|
||||
rest = 100d - new Double(percentValue).doubleValue();
|
||||
}
|
||||
catch(NumberFormatException e)
|
||||
{
|
||||
rest = 0;
|
||||
}
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append("<table class=\"percentGraph\" cellpadding=\"0\" cellspacing=\"0\" align=\"right\">");
|
||||
sb.append("<tr>");
|
||||
@@ -530,4 +538,4 @@ public class CoverageReport
|
||||
percentFormatter = NumberFormat.getPercentInstance();
|
||||
return percentFormatter.format(percent);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user