Hi. IntelliJ gives me a warning that the a call t...
# intellij
n
Hi. IntelliJ gives me a warning that the a call to Jackson’s Object Mapper.writeValueAsString is an “Inappropriate blocking method call”. Is that correct? I cannot see it doing any I/O or inter-thread communication that might block the thread.
d
That warning is based on a heuristic. If a method throws
IOException
it is determined to be blocking
Which is not always correct
n
Right. Thanks.
It throws JsonProcessingException, which is an IOException.
d
In this case it does not seem correct, that method throws IOException because it uses OutputStream, but that just writes to memory
n
I’ll annotate the warning away