Optimize object creation PartialMatchHelper
See gh-29634
This commit is contained in:
@@ -21,6 +21,7 @@ import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -345,6 +346,17 @@ public class RequestMappingInfoHandlerMappingTests {
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void handleNoMatchEmptyRequestMappingInfo() throws Exception {
|
||||
ServerWebExchange exchange = MockServerWebExchange.from(post("/bar"));
|
||||
|
||||
HandlerMethod handlerMethod = this.handlerMapping.handleNoMatch(new HashSet<>(), exchange);
|
||||
assertThat(handlerMethod).isNull();
|
||||
|
||||
handlerMethod = this.handlerMapping.handleNoMatch(null, exchange);
|
||||
assertThat(handlerMethod).isNull();
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T> void assertError(Mono<Object> mono, final Class<T> exceptionClass, final Consumer<T> consumer) {
|
||||
|
||||
Reference in New Issue
Block a user