Skip to content

vscjava.vscode-java-test-0.43.1 includes JaCoCo 0.8.12 instead of 0.8.13 #1793

Description

When I run JUnit test with code coverage in VS Code, I get a plenty of

java.lang.instrument.IllegalClassFormatException: Error while instrumenting com/sun/tools/attach/VirtualMachine with JaCoCo 0.8.12.202403310830/dbfb6f2.
	at org.jacoco.agent.rt.internal_aeaf9ab.CoverageTransformer.transform(CoverageTransformer.java:94)
...
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 69
	at org.jacoco.agent.rt.internal_aeaf9ab.asm.ClassReader.<init>(ClassReader.java:200)

The class file major revision is emitted by Java 25.

JaCoCo 0.8.13 can instrument class files with major revision 69.

According to the CHANGELOG, vscode-java-test 0.43.1 has been updated to to Jacoco 0.8.13. However, after installing vscode-java-test-0.43.1, I find .vscode\extensions\vscjava.vscode-java-test-0.43.1\server\jacocoagent.jar still to be version 0.8.12.

I can manually fix the bug, by replacing .vscode\extensions\vscjava.vscode-java-test-0.43.1\server\jacocoagent.jar by https://repo.maven.apache.org/maven2/org/jacoco/org.jacoco.agent/0.8.13/org.jacoco.agent-0.8.13.jar

Maybe, the bug is in this line: https://github.com/microsoft/vscode-java-test/blob/0.43.1/scripts/buildJdtlsExt.js#L79

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions