Skip to content

Commit

Permalink
Print mutation details on inlined code detection warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Jun 22, 2023
1 parent 1bb77b7 commit fa0b629
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.util.stream.Collectors;

import static java.util.function.Predicate.isEqual;
import static java.util.stream.Collectors.joining;
import static org.pitest.bytecode.analysis.InstructionMatchers.anyInstruction;
import static org.pitest.bytecode.analysis.InstructionMatchers.isInstruction;
import static org.pitest.bytecode.analysis.InstructionMatchers.notAnInstruction;
Expand Down Expand Up @@ -194,7 +195,12 @@ private boolean isInFinallyBlock(MutationDetails m) {

private boolean isPossibleToCorrectInlining(List<MutationDetails> mutationsInHandlerBlock) {
if (mutationsInHandlerBlock.size() > 1) {
LOG.warning("Found more than one mutation similar on same line in a finally block. Can't correct for inlining.");
LOG.warning("Found more than one mutation similar on same line in a finally block. "
+ "Can't correct for inlining.\n\t"
+ mutationsInHandlerBlock
.stream()
.map(Object::toString)
.collect(joining("\n\t")));
return false;
}

Expand Down

0 comments on commit fa0b629

Please sign in to comment.