Java 4..21, Kotlin, Code Coverage, bytecode: scandals, intrigues, investigations
summary
Bytecode inspection of Java (8, 11, 17, 21) and Kotlin shows concrete surprises: JaCoCo filters synthetic methods and special lambda names to avoid false uncovered lines, compilers add bridge/synthetic constructors (fixed by GDK 1.4 vs 11 Nest-based Access Control), try/finally and try-with-resources generate duplicated unreachable branches that JaCoCo merges, switch-by-string uses hash collisions adding extra comparisons, and Kotlin suspend/inline transformations produce many unmatchable branches that still require language-specific filters like special handling for Kotlin-generated methods.
AI-written summary · about
chapters (8)
- 0:00Introduction to Java and Kotlin
- 4:54Java bytecode deep dive
- 13:15Synthetic methods and bridges
- 21:55Java compiler tricks
- 28:00Finally blocks and exceptions
- 35:58Kotlin bytecode challenges
- 42:25Pattern matching in Java
- 49:55Conclusion and Q&A








