Java, Code Coverage & Their Best Friend: Bytecode
summary
JaCoCo inspects class files and implements bytecode pattern filters so coverage matches what was written in source, not the compiler noise: it ignores synthetic bridge and lambda methods (including different JVM naming schemes), collapses compiler-generated enum/value and switch-by-string hash branches, removes duplicated finally and try-with-resources artifacts, and honors Nest-based access from Java 11. The project tests across 17.5 JDKs, finds JDK bugs, and after filters the same test suite can jump from partial to 100% coverage (JaCoCo 0.8.2 and later).
AI-written summary · about
chapters (7)
- 0:00Intro
- 0:49Java Code Coverage
- 4:35Java
- 18:36JaCoCo should ignore synthetic methods
- 38:15Demo
- 43:42Conclusion
- 45:55Outro
related talks
44mJava Code Coverage Mechanics
46mKotlin, Java 4..18, Code Coverage and their best friend — bytecode: ...
56mJava 4..21, Kotlin, Code Coverage, bytecode: scandals, intrigues, investigations
39mBytecode Pattern Matching
38mThe state of code coverage for Kotlin
46mCode coverage MythBusters
42mThe state of code coverage for Kotlin
22mCollecting Code Coverage With Bazel
