Use ASM 6 API to read class files in IDE
Otherwise ASM throws exceptions trying to read module-info.class #KT-13072 Fixed
This commit is contained in:
@@ -52,12 +52,12 @@ object KotlinJvmMetadataVersionIndex : KotlinMetadataVersionIndexBase<KotlinJvmM
|
||||
|
||||
tryBlock(inputData) {
|
||||
val classReader = ClassReader(inputData.content)
|
||||
classReader.accept(object : ClassVisitor(Opcodes.ASM5) {
|
||||
classReader.accept(object : ClassVisitor(Opcodes.ASM6) {
|
||||
override fun visitAnnotation(desc: String, visible: Boolean): AnnotationVisitor? {
|
||||
if (desc != METADATA_DESC) return null
|
||||
|
||||
annotationPresent = true
|
||||
return object : AnnotationVisitor(Opcodes.ASM5) {
|
||||
return object : AnnotationVisitor(Opcodes.ASM6) {
|
||||
override fun visit(name: String, value: Any) {
|
||||
when (name) {
|
||||
METADATA_VERSION_FIELD_NAME -> if (value is IntArray) {
|
||||
|
||||
Reference in New Issue
Block a user