We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally raised as Upgrade to Spring Framework 6.1 causes null pointer in CoroutinesUtils, but investigated by Spring there and considered to be a bug here instead.
I've got a reactive kotlin spring boot repository that I'm attempting to spy. The superclass (CoroutineCrudRepository) has methods such as:
CoroutineCrudRepository
suspend fun findById(id: ID): T?
When autowiring the repository interface using Spring this gets created with a proxy signature of
public final java.lang.Object jdk.proxy3.$Proxy98.findById(java.lang.Object,kotlin.coroutines.Continuation)
Creating a spy from the repository using
mock(defaultAnswer = AdditionalAnswers.delegatesTo(exampleRepository))
then seems to end up with two versions of the findById method:
findById
public java.lang.Object uk.co.greenthistle.coroutinespybeanexample.ExampleRepository$MockitoMock$poIc1iZ2.findById(java.lang.Object,kotlin.coroutines.Continuation)
and also
public java.lang.Object uk.co.greenthistle.coroutinespybeanexample.ExampleRepository$MockitoMock$poIc1iZ2.findById(java.lang.Long,kotlin.coroutines.Continuation)
This seems to then cause the new spring boot code to choose the wrong method and then not be able to find the correct method to call on the spy.
Please see example project demonstrating the issue at https://github.com/petergphillips/spring-coroutine-spybean-example
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Originally raised as Upgrade to Spring Framework 6.1 causes null pointer in CoroutinesUtils, but investigated by Spring there and considered to be a bug here instead.
I've got a reactive kotlin spring boot repository that I'm attempting to spy. The superclass (
CoroutineCrudRepository
) has methods such as:When autowiring the repository interface using Spring this gets created with a proxy signature of
Creating a spy from the repository using
then seems to end up with two versions of the
findById
method:and also
This seems to then cause the new spring boot code to choose the wrong method and then not be able to find the correct method to call on the spy.
Please see example project demonstrating the issue at https://github.com/petergphillips/spring-coroutine-spybean-example
The text was updated successfully, but these errors were encountered: