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
This commit is contained in:
Rob Winch 2020-02-27 07:57:51 -06:00
parent 480c5bc87e
commit 727fee1e12
1 changed files with 1 additions and 1 deletions

View File

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