mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Add more nullability annotations to module/spring-boot-web-server
See gh-46587
This commit is contained in:
+5
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user