Explorar o código

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
Rob Winch %!s(int64=5) %!d(string=hai) anos
pai
achega
727fee1e12

+ 1 - 1
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;
 		}