Restore ResponseBodyEmitterReturnValueHandler constructor

Issue: SPR-15410
This commit is contained in:
Rossen Stoyanchev
2017-04-04 14:23:47 -04:00
parent ae2306326e
commit de6f34893a
4 changed files with 32 additions and 9 deletions

View File

@@ -67,10 +67,7 @@ public class ResponseBodyEmitterReturnValueHandlerTests {
List<HttpMessageConverter<?>> converters = Arrays.asList(
new StringHttpMessageConverter(), new MappingJackson2HttpMessageConverter());
ReactiveAdapterRegistry registry = new ReactiveAdapterRegistry();
TaskExecutor executor = new SyncTaskExecutor();
ContentNegotiationManager manager = new ContentNegotiationManager();
this.handler = new ResponseBodyEmitterReturnValueHandler(converters, registry, executor, manager);
this.handler = new ResponseBodyEmitterReturnValueHandler(converters);
this.request = new MockHttpServletRequest();
this.response = new MockHttpServletResponse();
this.webRequest = new ServletWebRequest(this.request, this.response);

View File

@@ -28,9 +28,7 @@ import org.junit.Test;
import reactor.core.publisher.Flux;
import org.springframework.core.MethodParameter;
import org.springframework.core.ReactiveAdapterRegistry;
import org.springframework.core.annotation.AliasFor;
import org.springframework.core.task.SyncTaskExecutor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.http.converter.HttpMessageConverter;
@@ -256,9 +254,7 @@ public class ServletInvocableHandlerMethodTests {
@Test
public void wrapConcurrentResult_ResponseBodyEmitter() throws Exception {
this.returnValueHandlers.addHandler(
new ResponseBodyEmitterReturnValueHandler(this.converters,
new ReactiveAdapterRegistry(), new SyncTaskExecutor(), new ContentNegotiationManager()));
this.returnValueHandlers.addHandler(new ResponseBodyEmitterReturnValueHandler(this.converters));
ServletInvocableHandlerMethod handlerMethod = getHandlerMethod(new StreamingHandler(), "handleEmitter");
handlerMethod = handlerMethod.wrapConcurrentResult(null);