Dynamic — Constants — oxymoron or promising JVM feature?
summary
Shows that dynamic class-file constants (Condy) let the JVM link a constant at runtime, removing synthetic static fields and allocations and enabling faster coverage probes. Demonstrates bytecode experiments with javac and javap and JaCoCo instrumentation, hitting real JVM bugs in OpenJ9/OpenJDK 11–14 where Condy of array types crashes and where bootstrap paths trigger static initializer exceptions. Gives workarounds (cast via Object arrays), cites limits like 65,536 field slots and typical static-init code hitting ~2.5k entries, and reports an effective increase to ~8k constants. Condy JaCoCo
AI-written summary · about
