Преглед на файлове

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 преди 5 години
родител
ревизия
727fee1e12
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      config/src/main/java/org/springframework/security/config/web/server/ServerHttpSecurity.java

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