I'm trying to extend the RabbitMQ `AbstractRouting...
# spring
e
I'm trying to extend the RabbitMQ
AbstractRoutingConnectionFactory
and override
getTargetConnectionFactory
. My function signature is just
override fun getTargetConnectionFactory(lookupKey: Any?): ConnectionFactory?
but the compiler is rejecting that, and only accepts
override fun getTargetConnectionFactory(lookupKey: Any): ConnectionFactory
. Looking at how
getTargetConnectionFactory
is used, it can clearly accept a null
lookupKey
and return a null
ConnectionFactory
. Am I missing something obvious here? I don't see any nullability annotations on
getTargetConnectionFactory
AbstractRoutingConnectionFactory
or any
package-info.java
that specifies package-wide null behavior. Spring Boot 3.4.3, spring-rabbit 3.2.3, Kotlin 1.9.23.