Skip to content

Commit 727fee1

Browse files
committed
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
1 parent 480c5bc commit 727fee1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3293,7 +3293,7 @@ public HeaderSpec frameOptions(Customizer<FrameOptionsSpec> frameOptionsCustomiz
32933293
* @author Ankur Pathak
32943294
*/
32953295
public HeaderSpec writer(ServerHttpHeadersWriter serverHttpHeadersWriter) {
3296-
Assert.notNull(serverHttpHeadersWriter, () -> "serverHttpHeadersWriter cannot be null");
3296+
Assert.notNull(serverHttpHeadersWriter, "serverHttpHeadersWriter cannot be null");
32973297
this.writers.add(serverHttpHeadersWriter);
32983298
return this;
32993299
}

0 commit comments

Comments
 (0)