Skip to content

Commit 92d5f63

Browse files
committed
Rename awaitPrincipal to awaitPrincipalOrNull
See spring-projectsgh-19975
1 parent b3d3778 commit 92d5f63

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/ServerRequestExtensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ suspend fun ServerRequest.awaitMultipartData(): MultiValueMap<String, Part> =
9090
* @author Sebastien Deleuze
9191
* @since 5.2
9292
*/
93-
suspend fun ServerRequest.awaitPrincipal(): Principal? =
93+
suspend fun ServerRequest.awaitPrincipalOrNull(): Principal? =
9494
principal().awaitFirstOrNull()
9595

9696
/**

spring-webflux/src/test/kotlin/org/springframework/web/reactive/function/server/ServerRequestExtensionsTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class ServerRequestExtensionsTests {
9191
val principal = mockk<Principal>()
9292
every { request.principal() } returns Mono.just(principal)
9393
runBlocking {
94-
assertEquals(principal, request.awaitPrincipal())
94+
assertEquals(principal, request.awaitPrincipalOrNull())
9595
}
9696
}
9797

0 commit comments

Comments
 (0)