mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
a142d21700
Using @SafeVarargs in Jackson mapper builder and factory bean classes allows the varargs methods to be used without a compiler warning. The implementations of these methods do not perform unsafe operations on their varargs parameter. It is therefore safe to add this annotation. The following two methods are changed: - add @SafeVarargs to Jackson2ObjectMapperBuilder#modulesToInstall and make it final - add @SafeVarargs to Jackson2ObjectMapperFactoryBean#setModulesToInstall and make it final This is a backwards incompatible change as these methods now have to be declared final. Existing subclasses that override one of these methods will break. Closes gh-25311