diff --git a/spring-messaging/src/main/kotlin/org/springframework/messaging/rsocket/RSocketRequesterExtensions.kt b/spring-messaging/src/main/kotlin/org/springframework/messaging/rsocket/RSocketRequesterExtensions.kt index 004b567a51e1..3e1897f67a91 100644 --- a/spring-messaging/src/main/kotlin/org/springframework/messaging/rsocket/RSocketRequesterExtensions.kt +++ b/spring-messaging/src/main/kotlin/org/springframework/messaging/rsocket/RSocketRequesterExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -110,6 +110,7 @@ suspend fun RSocketRequester.RetrieveSpec.sendAndAwait() { /** * Coroutines variant of [RSocketRequester.RetrieveSpec.retrieveMono]. * + * @throws NoSuchElementException if the underlying [Mono] does not emit any value * @author Sebastien Deleuze * @since 5.2 */ diff --git a/spring-r2dbc/src/main/kotlin/org/springframework/r2dbc/core/RowsFetchSpecExtensions.kt b/spring-r2dbc/src/main/kotlin/org/springframework/r2dbc/core/RowsFetchSpecExtensions.kt index 56533c66d77c..ae6b6facd3a0 100644 --- a/spring-r2dbc/src/main/kotlin/org/springframework/r2dbc/core/RowsFetchSpecExtensions.kt +++ b/spring-r2dbc/src/main/kotlin/org/springframework/r2dbc/core/RowsFetchSpecExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,10 +19,12 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.reactive.asFlow import kotlinx.coroutines.reactor.awaitSingleOrNull import org.springframework.dao.EmptyResultDataAccessException +import reactor.core.publisher.Mono /** * Non-nullable Coroutines variant of [RowsFetchSpec.one]. * + * @throws EmptyResultDataAccessException if the underlying [Mono] does not emit any value * @author Sebastien Deleuze */ @Suppress("DEPRECATION") @@ -42,6 +44,7 @@ suspend fun RowsFetchSpec.awaitOneOrNull(): T? = /** * Non-nullable Coroutines variant of [RowsFetchSpec.first]. * + * @throws EmptyResultDataAccessException if the underlying [Mono] does not emit any value * @author Sebastien Deleuze */ @Suppress("DEPRECATION") diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/ClientResponseExtensions.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/ClientResponseExtensions.kt index b922a0aaf801..5d5775b66419 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/ClientResponseExtensions.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/ClientResponseExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -102,6 +102,7 @@ suspend inline fun ClientResponse.awaitBody(): T = * `KClass` non-nullable coroutines variant of [ClientResponse.bodyToMono]. * Please consider `awaitBody` variant if possible. * + * @throws NoSuchElementException if the underlying [Mono] does not emit any value * @author Igor Manushin * @since 5.3 */ diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/WebClientExtensions.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/WebClientExtensions.kt index 100898577903..6c181e1b666f 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/WebClientExtensions.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/client/WebClientExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -143,6 +143,7 @@ inline fun WebClient.ResponseSpec.bodyToFlow(): Flow = /** * Coroutines variant of [WebClient.ResponseSpec.bodyToMono]. * + * @throws NoSuchElementException if the underlying [Mono] does not emit any value * @author Sebastien Deleuze * @since 5.2 */ diff --git a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/ServerRequestExtensions.kt b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/ServerRequestExtensions.kt index e446d51bfb3c..a0d563b02188 100644 --- a/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/ServerRequestExtensions.kt +++ b/spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/ServerRequestExtensions.kt @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,6 +76,7 @@ fun ServerRequest.bodyToFlow(clazz: KClass): Flow = /** * Non-nullable Coroutines variant of [ServerRequest.bodyToMono]. * + * @throws NoSuchElementException if the underlying [Mono] does not emit any value * @author Sebastien Deleuze * @since 5.2 */ @@ -86,6 +87,7 @@ suspend inline fun ServerRequest.awaitBody(): T = * `KClass` non-nullable Coroutines variant of [ServerRequest.bodyToMono]. * Please consider `awaitBody` variant if possible. * + * @throws NoSuchElementException if the underlying [Mono] does not emit any value * @author Igor Manushin * @since 5.3 */