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 May 8, 2023
1 parent 4f9beec commit 3ddf829
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;
Expand Down Expand Up @@ -195,7 +196,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 3ddf829

Please sign in to comment.