Merge branch '6.1.x'
This commit is contained in:
@@ -249,6 +249,15 @@ class InvocableHandlerMethodKotlinTests {
|
||||
assertHandlerResultValue(result, "foo-20")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun genericParameter() {
|
||||
val horse = Animal("horse")
|
||||
this.resolvers.add(stubResolver(horse))
|
||||
val method = AnimalController::handle.javaMethod!!
|
||||
val result = invoke(AnimalController(), method, null)
|
||||
assertHandlerResultValue(result, horse.name)
|
||||
}
|
||||
|
||||
|
||||
private fun invokeForResult(handler: Any, method: Method, vararg providedArgs: Any): HandlerResult? {
|
||||
return invoke(handler, method, *providedArgs).block(Duration.ofSeconds(5))
|
||||
@@ -379,6 +388,19 @@ class InvocableHandlerMethodKotlinTests {
|
||||
}
|
||||
}
|
||||
|
||||
private abstract class GenericController<T : Named> {
|
||||
|
||||
fun handle(named: T) = named.name
|
||||
}
|
||||
|
||||
private class AnimalController : GenericController<Animal>()
|
||||
|
||||
interface Named {
|
||||
val name: String
|
||||
}
|
||||
|
||||
data class Animal(override val name: String) : Named
|
||||
|
||||
@JvmInline
|
||||
value class LongValueClass(val value: Long)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user