From 727fee1e1261396f07439ac4adf54773de0aee45 Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Thu, 27 Feb 2020 07:57:51 -0600 Subject: [PATCH] Polish HeaderWriterSpec Assert.notNull(Object,Supplier) is for when then message passed in requires concatenation and avoids doing extra work. Since this does not require concatenation, we can use Assert.notNull(Object,String) Issue gh-7636 --- .../security/config/web/server/ServerHttpSecurity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java index 3b3febcd7f..d2a020eee5 100644 --- a/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java +++ b/config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java @@ -3293,7 +3293,7 @@ public class ServerHttpSecurity { * @author Ankur Pathak */ public HeaderSpec writer(ServerHttpHeadersWriter serverHttpHeadersWriter) { - Assert.notNull(serverHttpHeadersWriter, () -> "serverHttpHeadersWriter cannot be null"); + Assert.notNull(serverHttpHeadersWriter, "serverHttpHeadersWriter cannot be null"); this.writers.add(serverHttpHeadersWriter); return this; }