RFR: 7904057: com/sun/tdk/jcov/report/RecordContainerTest.java test is failing
Leonid Kuskov
lkuskov at openjdk.org
Mon Aug 11 17:27:34 UTC 2025
On Mon, 11 Aug 2025 14:27:38 GMT, Alexandre Iline <shurailine at openjdk.org> wrote:
>> [CODETOOLS-7904057](https://bugs.openjdk.org/browse/CODETOOLS-7904057): com/sun/tdk/jcov/report/RecordContainerTest.java test is failing
>
> src/classes/com/sun/tdk/jcov/report/LineCoverage.java line 151:
>
>> 149: if (!wasHit && isHit) {
>> 150: ++covered;
>> 151: } else if (wasHit && !isHit) {
>
> I presume this may change the numbers for line coverage all around. Can you recommend any additional testing to the JCov users, such as myself, to make sure the reports are still valid. Or is this such a corner case so that we, the users of JCov, should not worry?
The jcov report does not show how many times a code line was hit, so we just need to register that it happened without paying attention to the numbers. The report initially had this unhandled issue. To verify the fix, I compared the Java sources and javap outputs manually - no issues were detected. A unit test has been added.
> src/classes/com/sun/tdk/jcov/report/MethodCoverage.java line 66:
>
>> 64: */
>> 65: public MethodCoverage(DataMethod method, boolean isJavapCoverage) {
>> 66: this(method, isJavapCoverage, null, null);
>
> While I appreciate this change, let's perhaps not push unrelated changes in the future? Such habit (of including unrelated changes in the commit) makes reviewing a lot harder and may (and have had) lead to bug escapes. This time it's OK as the change does not alter the code behavior.
Agree, I just didn’t find an appropriate JBS issue to cover this cosmetic change.
-------------
PR Review Comment: https://git.openjdk.org/jcov/pull/65#discussion_r2267491729
PR Review Comment: https://git.openjdk.org/jcov/pull/65#discussion_r2267497862
More information about the jcov-dev
mailing list