Skip to content

Commit

Permalink
Merge pull request #890 from qoomon/master
Browse files Browse the repository at this point in the history
fix: handle isValue exceptions
  • Loading branch information
Raibaz committed Aug 24, 2022
2 parents 35e4dea + 95b3858 commit 0e9e346
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Expand Up @@ -3,6 +3,7 @@ package io.mockk
import kotlin.reflect.KClass
import kotlin.reflect.KProperty1
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.jvm.internal.KotlinReflectionInternalError
import kotlin.reflect.jvm.isAccessible
import kotlin.reflect.jvm.javaField

Expand Down Expand Up @@ -62,4 +63,6 @@ private val <T : Any> KClass<T>.isValue_safe: Boolean
this.isValue
} catch (_: UnsupportedOperationException) {
false
} catch (_: KotlinReflectionInternalError) {
false
}
Expand Up @@ -3,6 +3,7 @@ package io.mockk
import kotlin.reflect.KClass
import kotlin.reflect.KProperty1
import kotlin.reflect.full.declaredMemberProperties
import kotlin.reflect.jvm.internal.KotlinReflectionInternalError
import kotlin.reflect.jvm.isAccessible
import kotlin.reflect.jvm.javaField

Expand Down Expand Up @@ -62,4 +63,6 @@ private val <T : Any> KClass<T>.isValue_safe: Boolean
this.isValue
} catch (_: UnsupportedOperationException) {
false
} catch (_: KotlinReflectionInternalError) {
false
}

0 comments on commit 0e9e346

Please sign in to comment.