From 68ba55bea9c299b363632aaf7a0e6f99f3b1d8c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deleuze?= Date: Wed, 13 Sep 2023 18:30:01 +0200 Subject: [PATCH] Fix ModelInitializerKotlinTests See gh-30894 --- .../result/method/annotation/ModelInitializerKotlinTests.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/ModelInitializerKotlinTests.kt b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/ModelInitializerKotlinTests.kt index f8fec8f6a7..88223c7641 100644 --- a/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/ModelInitializerKotlinTests.kt +++ b/spring-webflux/src/test/kotlin/org/springframework/web/reactive/result/method/annotation/ModelInitializerKotlinTests.kt @@ -53,7 +53,7 @@ class ModelInitializerKotlinTests { val resolverConfigurer = ArgumentResolverConfigurer() resolverConfigurer.addCustomResolver(ModelMethodArgumentResolver(adapterRegistry)) val methodResolver = ControllerMethodResolver(resolverConfigurer, adapterRegistry, StaticApplicationContext(), - emptyList()) + emptyList(), null) modelInitializer = ModelInitializer(methodResolver, adapterRegistry) } @@ -64,7 +64,8 @@ class ModelInitializerKotlinTests { val method = ResolvableMethod.on(TestController::class.java).annotPresent(GetMapping::class.java) .resolveMethod() val handlerMethod = HandlerMethod(controller, method) - val context = InitBinderBindingContext(ConfigurableWebBindingInitializer(), emptyList()) + val context = InitBinderBindingContext(ConfigurableWebBindingInitializer(), emptyList(), + false, ReactiveAdapterRegistry.getSharedInstance()) this.modelInitializer.initModel(handlerMethod, context, this.exchange).block(timeout) val model = context.model.asMap() Assertions.assertThat(model).hasSize(2)