Fixed compile warnings
This commit is contained in:
parent
5f228cf7b4
commit
d4d8ddefc1
|
@ -130,7 +130,7 @@ class RmiSpamSyncSuspendingTest : BaseTest() {
|
|||
|
||||
private class TestObjectImpl(private val counter: AtomicLong) : TestObject {
|
||||
@Override
|
||||
override suspend fun setOther(aFloat: Long): Boolean {
|
||||
override suspend fun setOther(value: Long): Boolean {
|
||||
counter.getAndIncrement()
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -19,9 +19,10 @@ class SuspendProxyTest : TestCase() {
|
|||
|
||||
class SuspendHandler(private val delegate:Adder):InvocationHandler {
|
||||
override fun invoke(proxy: Any, method: Method, arguments: Array<Any>): Any {
|
||||
val suspendCoroutineObject = arguments?.lastOrNull()
|
||||
val suspendCoroutineObject = arguments.lastOrNull()
|
||||
return if (suspendCoroutineObject is Continuation<*>) {
|
||||
val parameters = arguments.copyOf(arguments.size - 1)
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
val continuation = suspendCoroutineObject as Continuation<Any?>
|
||||
val retVal = method.invoke(delegate, *parameters, Continuation<Any?>(EmptyCoroutineContext) {
|
||||
val continuationResult = it.getOrNull()
|
||||
|
@ -30,8 +31,7 @@ class SuspendProxyTest : TestCase() {
|
|||
|
||||
retVal
|
||||
} else {
|
||||
val parameters = arguments ?: arrayOf()
|
||||
method.invoke(delegate, *parameters)
|
||||
method.invoke(delegate, *arguments)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user