how to modify type of "$jacocoInit"

24 views
Skip to first unread message

jun yin

unread,
Nov 5, 2023, 10:52:19 AM11/5/23
to JaCoCo and EclEmma Users
I want to modify $jacocoInit from boolean[] to int[]. I changed the "[Z" to "[I", yet I calls these exceptions:

Exception in thread "main" java.lang.BootstrapMethodError: bootstrap method initialization exception
at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:188)
at java.base/java.lang.invoke.ConstantBootstraps.makeConstant(ConstantBootstraps.java:72)
at java.base/java.lang.invoke.MethodHandleNatives.linkDynamicConstantImpl(MethodHandleNatives.java:337)
at java.base/java.lang.invoke.MethodHandleNatives.linkDynamicConstant(MethodHandleNatives.java:329)
at com.example.demo.SpringbootDemoApplication.main(SpringbootDemoApplication.java)
Caused by: java.lang.ClassCastException: class [Z cannot be cast to class [I ([Z and [I are in module java.base of loader 'bootstrap')
at com.example.demo.SpringbootDemoApplication.$jacocoInitt(SpringbootDemoApplication.java)
at java.base/java.lang.invoke.BootstrapMethodInvoker.invoke(BootstrapMethodInvoker.java:90)
... 4 more

what should I do next, thanks.

Marc Hoffmann

unread,
Nov 5, 2023, 12:35:55 PM11/5/23
to JaCoCo and EclEmma Users
Hi,

JaCoCo uses boolean arrays to store probes. If you want to change that data type you basically have to change every aspect of JaCoCo: instrumentation, execution data handling, exec file format and remote protocols, analysis etc.

Regards,
-marc

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/0780bd7e-33ad-4729-a37d-ca4e8e1cf1f0n%40googlegroups.com.

jun yin

unread,
Nov 6, 2023, 7:58:36 AM11/6/23
to JaCoCo and EclEmma Users
Thanks a lot. I found out I forgot to modify probes in ExecutionData. It is too confuse to make such a mistake.
Reply all
Reply to author
Forward
0 new messages