Async return values refactoring in Spring MVC
Revise Javadoc on AsyncHandlerMethodReturnValueHandler to clarify its main purpose is to prioritze custom async return value handlers ahead of built-in ones. Also replace the interface from built-in handlers which are prioritized already. Remove DeferredResultAdapter and ResponseBodyEmitterAdapter -- introduced in 4.3 for custom async return value handling, since for 5.0 we will add built-in support for reactive types and the value of these contracts becomes very marginal. Issue: SPR-15365
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -21,14 +21,12 @@ import org.junit.Test;
|
||||
|
||||
import org.springframework.core.MethodParameter;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.mockito.Mockito.*;
|
||||
|
||||
import java.lang.annotation.Documented;
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
/**
|
||||
* Test fixture with {@link HandlerMethodReturnValueHandlerComposite}.
|
||||
@@ -86,9 +84,7 @@ public class HandlerMethodReturnValueHandlerCompositeTests {
|
||||
verifyNoMoreInteractions(anotherIntegerHandler);
|
||||
}
|
||||
|
||||
// SPR-13083
|
||||
|
||||
@Test
|
||||
@Test // SPR-13083
|
||||
public void handleReturnValueWithAsyncHandler() throws Exception {
|
||||
|
||||
Promise<Integer> promise = new Promise<>();
|
||||
|
||||
Reference in New Issue
Block a user