mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
ResponseEntity headers builder casts body to any type
Issue: SPR-14939
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user