I recently upgraded to IntelliJ 2019.3 and to Kotl...
# coroutines
I recently upgraded to IntelliJ 2019.3 and to Kotlin 1.3.61, and I'm starting to see a ton of "Inappropriate blocking method call" inspections. They mostly seem to be inside
functions where they call other
functions I wrote, so they seem like they may be spurious. Does anyone have any ideas about how to learn more about why these inspections are showing up, to either report a bug or to fix my code if it is in fact bad?
Those should only be marked on blocking methods such as Lock, any I/O calls, or things that throw InterruptedException. The fix is to ensure you are running those methods under Dispatchers.IO, but if they're suspend functions it sounds like a bug
Right, the highlighted function call in question is a function I wrote, not some sort of built in/library function
so I don't get if it's trying to tell me that the highlighted call somehow actually is blocking even though it's a suspend function (but there are no inspections showing up inside its own body), or what
yea, probably a bug. I would Invalidate Caches and restart IntelliJ, see if it persists
heh, i guess i don't need to get any work done for the next half hour ­čÖé
if so, check for an existing bug and file if none found
one thing that is odd is that when i searched the YT for the error message, all the references came back saying "inappropriate thread-blocking method call" but the inspection I'm seeing doesn't have
in it
Hmm maybe this is related to having an
on my method?
I noticed that it mostly targets methods that throws
, as those methods will always perform IO in some way due to Java having checked exceptions.