Skip to content

Commit

Permalink
Fix proxy hint Kotlin extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
sdeleuze authored and mdeinum committed Jun 29, 2023
1 parent b8fa47d commit 188f05f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ import kotlin.reflect.KClass
* @since 6.0.5
*/
fun JdkProxyHint.Builder.proxiedInterfaces(vararg proxiedInterfaces: KClass<*>) =
proxiedInterfaces(*proxiedInterfaces.map { it::class.java }.toTypedArray())
proxiedInterfaces(*proxiedInterfaces.map { it.java }.toTypedArray())
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ import kotlin.reflect.KClass
* @since 6.0.5
*/
fun ProxyHints.registerJdkProxy(vararg proxiedInterfaces: KClass<*>) =
registerJdkProxy(*proxiedInterfaces.map { it::class.java }.toTypedArray())
registerJdkProxy(*proxiedInterfaces.map { it.java }.toTypedArray())
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class JdkProxyHintExtensionsTests {
fun `proxiedInterfaces builder extension`() {
every { builder.proxiedInterfaces(*anyVararg<Class<*>>()) } returns builder
builder.proxiedInterfaces(String::class, Int::class)
verify { builder.proxiedInterfaces(*anyVararg<Class<*>>()) }
verify { builder.proxiedInterfaces(String::class.java, Int::class.java) }
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ProxyHintsExtensionsTests {
fun `registerJdkProxy extension`() {
every { proxyHints.registerJdkProxy(*anyVararg<Class<*>>()) } returns proxyHints
proxyHints.registerJdkProxy(String::class, Int::class)
verify { proxyHints.registerJdkProxy(*anyVararg<Class<*>>()) }
verify { proxyHints.registerJdkProxy(String::class.java, Int::class.java) }
}

}

0 comments on commit 188f05f

Please sign in to comment.