leodamsky
08/20/2019, 12:24 PMorg.springframework.transaction.support.AbstractPlatformTransactionManager
which method doGetTransaction
is actually nullable, but Kotlin compiler doesn't understand that. In the first picture - a method itself and in the second one - method which is used after doGetTransaction
with nullable param. I'm 100% sure doGetTransaction
return type should be treated as nullable.leodamsky
08/20/2019, 12:29 PMleodamsky
08/20/2019, 12:39 PMorg.springframework.lang.NonNullApi
Mike
08/20/2019, 12:48 PMBrandon Ward
08/20/2019, 3:44 PM@Nullable
on the method in question). It won't immediately fix your problem, but it would fix it in the future for yourself and others.Mike
08/20/2019, 3:53 PMBrandon Ward
08/20/2019, 6:49 PMMike
08/20/2019, 6:57 PMsdeleuze
08/21/2019, 6:29 AMsdeleuze
08/21/2019, 7:30 AMdoGetTransaction
return value should be null
, based on existing implementation the contract seems to be throwing TransactionException
in case of null
transaction. For suspend()
that's different null
transaction means "suspend active synchronizations" as stated in the Javadoc.