One of the goals of ClassFile API is to avoid updating the copy of ASM to support future class file formats.
However, some tests in hotspot turn out to parse latest class files to transform them to inject desired bytecode patterns. This forces us to keep maintaining the ASM library, which will be costly with the upcoming project Valhalla.
To avoid maintaining ASM down the road, we can either:
1. Migrate the transformation to ClassFile API
2. Set source and release version in javac flags to produce stable bytecode
I recommend migrating to ClassFile API; javac has a deprecation policy, that in the future, old source and target versions will no longer be supported, and we would still need another port at that time.