RFR: 7902724: jcov ignores covariant method overriding while gathering a methods' coverages

Leonid Kuskov lkuskov at openjdk.java.net
Wed Jul 22 20:33:17 UTC 2020


This is the fix for https://bugs.openjdk.java.net/browse/CODETOOLS-7902724
It marks both an original and bridge methods as covered

jcov marks a bridge method as covered ignoring an original method called by a JCK test.
Now it marks both the original and the bridge methods as covered if the bridge method is called like as follows:

I.e. if the method "Bar getObject()" is called then "Foo getObject()"  is also covered
class Foo extends Bar {
     Foo getObject() {
       return foo;
   }

   synthetic bridge Bar getObject() {
       return ((Foo) this).getObject();
  }
}
earlier  "Foo getObject()" was not taken into account as covered.

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

Commit messages:
 - 7902724: jcov ignores covariant method overriding while gathering a methods' coverages
 - 7902642: Make JCov runtime to only depend on java.base
 - Merge branch 'CODETOOLS-7902697'
 - 7902697: Switch jcov to the latest asm lib to support latest classfile
 - Merge branch 'master' of https://github.com/lkuskov/jcov
 - 7902535: Code coverage does not work in JDK 8

Changes: https://git.openjdk.java.net/jcov/pull/4/files
 Webrev: https://webrevs.openjdk.java.net/jcov/4/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/CODETOOLS-7902724
  Stats: 66 lines in 7 files changed: 29 ins; 6 del; 31 mod
  Patch: https://git.openjdk.java.net/jcov/pull/4.diff
  Fetch: git fetch https://git.openjdk.java.net/jcov pull/4/head:pull/4

PR: https://git.openjdk.java.net/jcov/pull/4


More information about the jcov-dev mailing list