Debugger, eval4j: Remove eager class loading in findField() (KT-35354)

This commit is contained in:
Yan Zhulanow
2019-12-24 20:09:32 +09:00
parent 8f29f8bc9d
commit 01a6e7abf3
@@ -173,9 +173,8 @@ open class JDIEval(
}
private fun findField(fieldDesc: FieldDescription, receiver: ReferenceType? = null): Field {
for (owner in listOfNotNull(receiver, fieldDesc.ownerType.asReferenceType())) {
owner.fieldByName(fieldDesc.name)?.let { return it }
}
receiver?.fieldByName(fieldDesc.name)?.let { return it }
fieldDesc.ownerType.asReferenceType().fieldByName(fieldDesc.name)?.let { return it }
throwBrokenCodeException(NoSuchFieldError("Field not found: $fieldDesc"))
}