Newly added TransactionOperations.execute(Runnable) breaks existing Kotlin code #23724
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
type: regression
A bug that is also a regression
Milestone
Affects: 5.2.0.RC1+
2c33c11 / #23250 added the new
TransactionOperations.execute(Runnable)
method for Java lambda usage without return value.However it breaks existing Kotlin code using TransactionTemplate with return values:
This happens because Kotlin allows omitting single parameter (the implicit
it
parameter). Kotlin compiler cannot distinguish no-argRunnable
with unaryTransactionCallback<T>
.In order to disambiguate, a parameter or the callback interface should be explicitly stated:
I'm not sure how to fix it. Maybe let it break for bigger convenience in Java?
The text was updated successfully, but these errors were encountered: