#751 - Align Hop header assertions with HttpHeaders and javadocs.

Spring Framework accepts `null` for header values in HttpHeaders. This is already reflected in the javadocs.
This commit is contained in:
Johnny Lim
2018-11-22 22:40:35 +09:00
committed by Greg Turnquist
parent d5649c0de1
commit ca0263fc5a

View File

@@ -95,8 +95,7 @@ public class Hop {
*/
public Hop header(String headerName, String headerValue) {
Assert.notNull(headerName, "headerName must not be null!");
Assert.notNull(headerValue, "headerValue must not be null!");
Assert.hasText(headerName, "headerName must not be null or empty!");
if (this.headers == HttpHeaders.EMPTY) {