From 486196061ee71178ab99308feaf713c132c46e40 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 12 Sep 2022 10:05:13 +0200 Subject: [PATCH] Adapt to API change in Spring Framework See https://github.com/spring-projects/spring-framework/issues/29005 --- .../cloud/stream/binder/BinderChildContextInitializer.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderChildContextInitializer.java b/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderChildContextInitializer.java index 29a9ba46a1..11dc24dd8e 100644 --- a/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderChildContextInitializer.java +++ b/core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/BinderChildContextInitializer.java @@ -26,7 +26,6 @@ import org.springframework.aot.generate.GeneratedMethod; import org.springframework.aot.generate.GenerationContext; -import org.springframework.aot.generate.MethodReference; import org.springframework.beans.factory.aot.BeanRegistrationAotContribution; import org.springframework.beans.factory.aot.BeanRegistrationAotProcessor; import org.springframework.beans.factory.aot.BeanRegistrationCode; @@ -159,8 +158,7 @@ public void applyTo(GenerationContext generationContext, BeanRegistrationCode be }); method.addStatement("return instance.withChildContextInitializers(initializers)"); }); - beanRegistrationCode.addInstancePostProcessor( - MethodReference.ofStatic(beanRegistrationCode.getClassName(), postProcessorMethod.getName())); + beanRegistrationCode.addInstancePostProcessor(postProcessorMethod.toMethodReference()); } }