Add more nullability annotations to module/spring-boot-web-server

See gh-46587
This commit is contained in:
Moritz Halbritter
2025-08-05 09:39:25 +02:00
parent 526b9d0554
commit 0efeea69d0
@@ -457,8 +457,12 @@ public class Ssl {
* @return the mapped value
* @since 3.1.0
*/
@Contract("_, !null, _, _ -> !null")
public static <R> @Nullable R map(@Nullable ClientAuth clientAuth, @Nullable R none, R want, R need) {
return switch ((clientAuth != null) ? clientAuth : NONE) {
if (clientAuth == null) {
return none;
}
return switch (clientAuth) {
case NONE -> none;
case WANT -> want;
case NEED -> need;