why does idea mark `jackson.readValue(string, cla...
# coroutines
c
why does idea mark
jackson.readValue(string, class)
as Inappropiate blocking call in a suspend method?
h
Because its inspections aren't good enough (yet?). Apparently, if you specify Dispatchers.IO close enough, it doesn't complain, but if the calling function is «far away» from the suspend function, it isn't quite certain about which dispatcher will run the code.
c
but that method is never blocking, it does no IO
a
Parsing json may also block. Perhaps this is the case.
h
Doesn't Jackson push the string into a Reader (I am taking this from memory now)? Are you certain there are no special circumstances or implementations where this might block?
k
Intellij assumes functions throwing IOException are blocking
☝️ 1
c
its not throwing IOException. not in the latest stable version that I am using