Treat Kotlin warnings as errors

Closes gh-23566
This commit is contained in:
Sebastien Deleuze 2019-09-02 16:49:31 +02:00
parent a2e740c896
commit c13941821a
2 changed files with 3 additions and 0 deletions

View File

@ -86,6 +86,7 @@ configure(allprojects.findAll { (it.name != "framework-bom") } ) { project ->
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = ["-Xjsr305=strict"]
allWarningsAsErrors = true
}
}
compileTestKotlin {

View File

@ -17,6 +17,7 @@
package org.springframework.messaging.rsocket
import io.rsocket.transport.ClientTransport
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.reactive.awaitFirstOrNull
import kotlinx.coroutines.reactive.awaitSingle
@ -118,6 +119,7 @@ suspend inline fun <reified T : Any> RSocketRequester.ResponseSpec.retrieveAndAw
* @author Sebastien Deleuze
* @since 5.2
*/
@ExperimentalCoroutinesApi
inline fun <reified T : Any> RSocketRequester.ResponseSpec.retrieveFlow(): Flow<T> =
retrieveFlux(object : ParameterizedTypeReference<T>() {}).asFlow()