Partial code coverage bug?
I am trying to write some unit tests and get a piece of legacy Java code to 100% code coverage so that I can do some refactoring. To make sure that I have covered all of the paths through the code i enabled tracing mode in the code coverage. Mostly this seems to do what I expect, but I have an if-statement that still shows up as 'partial' even though there is only one expression in the if and both paths are taken:

this line stays yellow even if I extract the method call into a variable. Is there something in the definition of 'partial coverage' that I'm missing, or is this just a bug in the code coverage tooling of Idea? If it's a bug then it's very awkward - trying to figure out if the partial lines are false negatives would slow me down considerably.
Please sign in to leave a comment.
I thought maybe it was inlining the small static method and somehow failing to visit one of the boolean conditions, but that doesn't seem to be the case. I replaced it with the Apache Commons equivalent and it's still yellow, and it seems to get all possible input variants (null, empty, whitespace-only, text).
Is it possible to share a small sample where this could be reproduced?
Sure. I reduced the test case as far as I can: https://github.com/gopf/intellij-code-coverage
Changing to the JaCoCo runner seems to fix it too, but I can't find a way to set that as default, so every new run uses the IntelliJ runner.
What version of IntelliJ IDEA is in use? Code coverage is shown as expected in 2021.1: https://i.imgur.com/h05dUan.png
yes, it seems to work correctly in the EAP version. Thanks.