mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
New test runners: ReflectionUtil delegation property bug fixed
This commit is contained in:
@@ -118,11 +118,11 @@ fun getProperties(instance: Any, annotationToFilterByClass: Class<*>? = null, us
|
||||
val klass = instance.javaClass.kotlin
|
||||
val allKotlinProperties = LinkedHashSet(klass.memberProperties.filterIsInstance(KProperty::class.java))
|
||||
|
||||
var delegatedProperties = listOf<Property>() // See DelegationProperty doc
|
||||
val delegatedProperties = ArrayList<Property>() // See DelegationProperty doc
|
||||
allKotlinProperties.filter { it.isAnnotated(DelegationProperty::class) }.forEach {
|
||||
val delegatedInstance = it.getter.call(instance)
|
||||
if (delegatedInstance != null) {
|
||||
delegatedProperties = getProperties(delegatedInstance, annotationToFilterBy?.java, false).properties
|
||||
delegatedProperties.addAll(getProperties(delegatedInstance, annotationToFilterBy?.java, false).properties)
|
||||
allKotlinProperties.remove(it)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user