RFR: 7903842: Negative coverage in report for records

Alexandre Iline shurailine at openjdk.org
Fri Dec 20 19:36:51 UTC 2024


On Mon, 7 Oct 2024 20:10:03 GMT, Leonid Kuskov <lkuskov at openjdk.org> wrote:

> The Javap report had several issues marked in the picture below, which have been fixed:
> ![defectReport](https://github.com/user-attachments/assets/b8de7fc9-c59b-41f9-8300-700a1e24b533)
> The expected report is:
> ![fixedReport](https://github.com/user-attachments/assets/e7aa1ef4-3bed-46d8-80eb-a6e2c87a6da2)

I think it would be better to rename "line coverage" to "instruction coverage" in this report. Some other word can be used, but "instruction" is the best I can come up with.

The reasons are:
1. Line is associated with a source line.  What's listed in the reworked report are not lines, they are byte code instructions. One may argue that a line could correspond to a javap utility output line, but that is superficial.
2. If the column name the same as in a corresponding report with java code, first action of anybody looking on the report would be to compare the numbers. Compare line coverage from one report to the line coverage in the other report. Without knowledge that the report is showing something else, it is impossible to explain the numbers.

The test added by https://bugs.openjdk.org/browse/CODETOOLS-7903867 is only checking that there is no negative coverage. An update to it is needed to check that the right coverage is reported.

-------------

PR Comment: https://git.openjdk.org/jcov/pull/48#issuecomment-2557605833
PR Comment: https://git.openjdk.org/jcov/pull/48#issuecomment-2557607447


More information about the jcov-dev mailing list