Debugger, eval4j: Remove eager class loading in findField() (KT-35354)
This commit is contained in:
@@ -173,9 +173,8 @@ open class JDIEval(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun findField(fieldDesc: FieldDescription, receiver: ReferenceType? = null): Field {
|
private fun findField(fieldDesc: FieldDescription, receiver: ReferenceType? = null): Field {
|
||||||
for (owner in listOfNotNull(receiver, fieldDesc.ownerType.asReferenceType())) {
|
receiver?.fieldByName(fieldDesc.name)?.let { return it }
|
||||||
owner.fieldByName(fieldDesc.name)?.let { return it }
|
fieldDesc.ownerType.asReferenceType().fieldByName(fieldDesc.name)?.let { return it }
|
||||||
}
|
|
||||||
|
|
||||||
throwBrokenCodeException(NoSuchFieldError("Field not found: $fieldDesc"))
|
throwBrokenCodeException(NoSuchFieldError("Field not found: $fieldDesc"))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user