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
@@ -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;
}