Obtaining a method return type usually works using Method.getReturnType except for suspended Kotlin methods (e.g. suspend fun foo()) as Kotlin changes the bytecode signature to return Object and the return type is synthesized as method argument through the generic parameter of Continuation<...>.
Therefore, obtaining the return type for a suspended method requires an inspection of the method parameters. We should provide a utility method in RepositoryMetadata so that we can reuse this functionality from store modules
Affects: 2.3 GA (Neumann), 2.4 M1 (2020.0.0)
Issue Links:
DATAMONGO-2562 CoroutineCrudRepository findAllBy throwing IncorrectResultSizeDataAccessException when more than 1 result
("is depended on by")
Mark Paluch opened DATACMNS-1738 and commented
Obtaining a method return type usually works using
Method.getReturnType
except for suspended Kotlin methods (e.g.suspend fun foo()
) as Kotlin changes the bytecode signature to returnObject
and the return type is synthesized as method argument through the generic parameter ofContinuation<...>
.Therefore, obtaining the return type for a suspended method requires an inspection of the method parameters. We should provide a utility method in
RepositoryMetadata
so that we can reuse this functionality from store modulesAffects: 2.3 GA (Neumann), 2.4 M1 (2020.0.0)
Issue Links:
("is depended on by")
Backported to: 2.3.1 (Neumann SR1)
The text was updated successfully, but these errors were encountered: