Change By: H Mlnarik (17/Jul/12 6:04 AM)
Description: Method descriptions in Jacoco XML file contains counts for different categories (INSTRUCTION, BRANCH etc.) that are rendered to HTML cells in reports. When some category is missing, nothing is generated. Empty cell is generated instead which is aesthetically not nice (and potentially might shift the results to wrong category?) 

For example, consider the following XML snippet:
...
{code}
      <method name="checkIfRequiredElement" desc="(Ljava/lang/String;Ljava/util/List;Ljava/util/Stack;)Ljava/lang/String;" line="790">
        <counter type="INSTRUCTION" missed="19" covered="51"/>
        <counter type="BRANCH" missed="4" covered="8"/>
        <counter type="LINE" missed="4" covered="19"/>
        <counter type="COMPLEXITY" missed="3" covered="4"/>
        <counter type="METHOD" missed="0" covered="1"/>
      </method>
      <method name="&lt;clinit&gt;" desc="()V" line="59">
        <counter type="INSTRUCTION" missed="0" covered="4"/>
        <counter type="LINE" missed="0" covered="1"/>
        <counter type="COMPLEXITY" missed="0" covered="1"/>
        <counter type="METHOD" missed="0" covered="1"/>
      </method>
{code}
...

BRANCH category is missing in {{<clinit>}}, rendering as shown in the attached Jenkins-jacoco.png image. The cell for branch is not rendered at all (confirmed also from HTML source where only
 four  five  {{<td>}} elements are present , should be six ). Should render an empty cell (i.e. {{<td>&nbsp;</td>}}) or something similar.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to