RFR: 7902783: Static instrumentation fails with Java 9 and above if multiple inputs are used [v2]

Leonid Kuskov lkuskov at openjdk.java.net
Sat Dec 5 01:59:27 UTC 2020


> 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.

Leonid Kuskov has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision:

  7902783: Static instrumentation fails with Java 9 and above if multiple inputs are used

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

Changes:
  - all: https://git.openjdk.java.net/jcov/pull/5/files
  - new: https://git.openjdk.java.net/jcov/pull/5/files/c99d5b69..7bc3a3f1

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jcov&pr=5&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jcov&pr=5&range=00-01

  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jcov/pull/5.diff
  Fetch: git fetch https://git.openjdk.java.net/jcov pull/5/head:pull/5

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


More information about the jcov-dev mailing list