Integrated: 7902783: Static instrumentation fails with Java 9 and above if multiple inputs are used
Leonid Kuskov
lkuskov at openjdk.java.net
Thu Dec 17 02:38:59 UTC 2020
On Sat, 5 Dec 2020 01:19:38 GMT, Leonid Kuskov <lkuskov at openjdk.org> wrote:
> This is the fix for https://bugs.openjdk.java.net/browse/CODETOOLS-7902783
>
> java -jar jcov.jar instr -verbose -t [template] -i [pattern] -o [output] [input1] [input2]
> In certain cases input classes: [input1], [input2] for instrumentation should be loaded by jcov via reflection.
> Starting from version 9 Java SE and the JDK do not provide an API for applications to dynamically augment the class path at run-time.
> The fix checks the application class loader is not an instance of java.net.URLClassLoader.
> In this case, the jcov throws the message otherwise the application dynamically adds input classes: [input1], [input2] to the classpath.
This pull request has now been integrated.
Changeset: e4bb6779
Author: Leonid Kuskov <lkuskov at openjdk.org>
URL: https://git.openjdk.java.net/jcov/commit/e4bb6779
Stats: 122 lines in 4 files changed: 41 ins; 45 del; 36 mod
7902783: Static instrumentation fails with Java 9 and above if multiple inputs are used
-------------
PR: https://git.openjdk.java.net/jcov/pull/5
More information about the jcov-dev
mailing list