"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/ServerRequestExtensions.kt" between
spring-framework-5.3.7.tar.gz and spring-framework-5.3.8.tar.gz

About: Spring Framework is an application framework for the Java platform and .NET Framework. Community edition.

ServerRequestExtensions.kt  (spring-framework-5.3.7):ServerRequestExtensions.kt  (spring-framework-5.3.8)
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* https://www.apache.org/licenses/LICENSE-2.0 * https://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
skipping to change at line 101 skipping to change at line 101
*/ */
suspend fun <T : Any> ServerRequest.awaitBody(clazz: KClass<T>): T = suspend fun <T : Any> ServerRequest.awaitBody(clazz: KClass<T>): T =
bodyToMono(clazz.java).awaitSingle() bodyToMono(clazz.java).awaitSingle()
/** /**
* Nullable Coroutines variant of [ServerRequest.bodyToMono]. * Nullable Coroutines variant of [ServerRequest.bodyToMono].
* *
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @since 5.2 * @since 5.2
*/ */
@Suppress("DEPRECATION")
suspend inline fun <reified T : Any> ServerRequest.awaitBodyOrNull(): T? = suspend inline fun <reified T : Any> ServerRequest.awaitBodyOrNull(): T? =
bodyToMono<T>().awaitSingleOrNull() bodyToMono<T>().awaitSingleOrNull()
/** /**
* `KClass` nullable Coroutines variant of [ServerRequest.bodyToMono]. * `KClass` nullable Coroutines variant of [ServerRequest.bodyToMono].
* Please consider `awaitBodyOrNull<Foo>` variant if possible. * Please consider `awaitBodyOrNull<Foo>` variant if possible.
* *
* @author Igor Manushin * @author Igor Manushin
* @since 5.3 * @since 5.3
*/ */
@Suppress("DEPRECATION")
suspend fun <T : Any> ServerRequest.awaitBodyOrNull(clazz: KClass<T>): T? = suspend fun <T : Any> ServerRequest.awaitBodyOrNull(clazz: KClass<T>): T? =
bodyToMono(clazz.java).awaitSingleOrNull() bodyToMono(clazz.java).awaitSingleOrNull()
/** /**
* Coroutines variant of [ServerRequest.formData]. * Coroutines variant of [ServerRequest.formData].
* *
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @since 5.2 * @since 5.2
*/ */
suspend fun ServerRequest.awaitFormData(): MultiValueMap<String, String> = suspend fun ServerRequest.awaitFormData(): MultiValueMap<String, String> =
skipping to change at line 138 skipping to change at line 140
*/ */
suspend fun ServerRequest.awaitMultipartData(): MultiValueMap<String, Part> = suspend fun ServerRequest.awaitMultipartData(): MultiValueMap<String, Part> =
multipartData().awaitSingle() multipartData().awaitSingle()
/** /**
* Coroutines variant of [ServerRequest.principal]. * Coroutines variant of [ServerRequest.principal].
* *
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @since 5.2 * @since 5.2
*/ */
@Suppress("DEPRECATION")
suspend fun ServerRequest.awaitPrincipal(): Principal? = suspend fun ServerRequest.awaitPrincipal(): Principal? =
principal().awaitSingleOrNull() principal().awaitSingleOrNull()
/** /**
* Coroutines variant of [ServerRequest.session]. * Coroutines variant of [ServerRequest.session].
* *
* @author Sebastien Deleuze * @author Sebastien Deleuze
* @since 5.2 * @since 5.2
*/ */
suspend fun ServerRequest.awaitSession(): WebSession = suspend fun ServerRequest.awaitSession(): WebSession =
 End of changes. 4 change blocks. 
1 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)