The algorithm to detect deprecated code to add @SuppressWarnings
does not work properly when the factory method isn't public. This impacts the smoke tests with Spring Boot 4.0.0-SNAPSHOT
where any MVC app triggers the following warnings:
/Users/snicoll/workspace/work/spring-aot-smoke-tests/main/framework/validation/build/generated/aotSources/org/springframework/boot/webmvc/autoconfigure/WebMvcAutoConfiguration__BeanDefinitions.java:572: warning: [removal] HandlerMappingIntrospector in org.springframework.web.servlet.handler has been deprecated and marked for removal
private static BeanInstanceSupplier<HandlerMappingIntrospector> getMvcHandlerMappingIntrospectorInstanceSupplier(
^
/Users/snicoll/workspace/work/spring-aot-smoke-tests/main/framework/validation/build/generated/aotSources/org/springframework/boot/webmvc/autoconfigure/WebMvcAutoConfiguration__BeanDefinitions.java:574: warning: [removal] HandlerMappingIntrospector in org.springframework.web.servlet.handler has been deprecated and marked for removal
return BeanInstanceSupplier.<HandlerMappingIntrospector>forFactoryMethod(WebMvcAutoConfiguration.EnableWebMvcConfiguration.class, "mvcHandlerMappingIntrospector");
If the factory method is public, the warning is correctly detected and a SupressWarnings
statement is added as expected.
Comment From: github-actions[bot]
Fixed via 0a48984fab3657727ab5ed2766186f7486fe4a4c