Line Cover Rate invalid calcul
-------------------------------
Key: MOJO-662
URL: http://jira.codehaus.org/browse/MOJO-662
Project: Mojo
Issue Type: Bug
Components: dashboard
Reporter: Brice Ruzand
Attachments: CoberturaReportBean.java
in this classe :
org.codehaus.mojo.dashboard.report.plugin.beans.CoberturaReportBean
in method merge : calculation of lineCoverRate is missing
methode with correction
/**
*
* @param dashboardReport
*/
public void merge( CoberturaReportBean dashboardReport )
{
if ( dashboardReport != null )
{
this.nbClasses = this.nbClasses + dashboardReport.getNbClasses();
this.numberOfCoveredBranches = this.numberOfCoveredBranches +
dashboardReport.getNumberOfCoveredBranches();
this.numberOfCoveredLines = this.numberOfCoveredLines +
dashboardReport.getNumberOfCoveredLines();
this.numberOfValidBranches = this.numberOfValidBranches +
dashboardReport.getNumberOfValidBranches();
this.numberOfValidLines = this.numberOfValidLines +
dashboardReport.getNumberOfValidLines();
if ( numberOfValidBranches == 0 )
{
// no branches, therefore 100% branch coverage.
branchCoverRate = 1d;
}
else
{
branchCoverRate = (double) numberOfCoveredBranches /
numberOfValidBranches;
}
if ( numberOfValidLines == 0 )
{
// no branches, therefore 100% branch coverage.
lineCoverRate = 1d;
}
else
{
lineCoverRate = (double) numberOfCoveredLines /
numberOfValidLines;
}
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email