In the following code:
boolean upload(String repo, String project, String version, String profile) {
StringBuilder command = new StringBuilder(createCommand(repo, project, version, profile))
command.append(uploadCommand(repo, project, version))
}
The "Stringbuilder" command is flagged by jacoco as "2 of 4 branches missed"
I do not see how I can cover them (I don't even know what the source code of StringBuilder is). Moreover, in this example, the StringBuilder constructor (which I admit is not the same constructor), appears in green.
I have been trying to tell jacoco to ignore the class but it's not working, and I guess it would be better if I understood why this issue (which I also have with some methods, as String.toLower()"
We build using the maven plugin and the code is actually groovy, not java
Thanks for helping