ResponseEntity headers builder casts body to any type

Issue: SPR-14939
This commit is contained in:
Rossen Stoyanchev
2016-11-28 17:22:24 -05:00
parent 9755ae3cbe
commit dd3b9c7c35
2 changed files with 16 additions and 7 deletions

View File

@@ -381,7 +381,7 @@ public class ResponseEntity<T> extends HttpEntity<T> {
* @return the response entity
* @see BodyBuilder#body(Object)
*/
ResponseEntity<Void> build();
<T> ResponseEntity<T> build();
}
@@ -505,7 +505,7 @@ public class ResponseEntity<T> extends HttpEntity<T> {
}
@Override
public ResponseEntity<Void> build() {
public <T> ResponseEntity<T> build() {
return body(null);
}