Skip to content

Commit ca0263f

Browse files
izeyegregturn
authored andcommitted
#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.
1 parent d5649c0 commit ca0263f

File tree

1 file changed

+1
-2
lines changed
  • src/main/java/org/springframework/hateoas/client

1 file changed

+1
-2
lines changed

src/main/java/org/springframework/hateoas/client/Hop.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,7 @@ public Hop withParameter(String name, Object value) {
9595
*/
9696
public Hop header(String headerName, String headerValue) {
9797

98-
Assert.notNull(headerName, "headerName must not be null!");
99-
Assert.notNull(headerValue, "headerValue must not be null!");
98+
Assert.hasText(headerName, "headerName must not be null or empty!");
10099

101100
if (this.headers == HttpHeaders.EMPTY) {
102101

0 commit comments

Comments
 (0)