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 Oct 5, 2019
1 parent 0bf7f99 commit d572600
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.pitest.mutationtest.build.intercept.javafeatures;

import static java.util.stream.Collectors.joining;
import static org.pitest.functional.FCollection.bucket;
import static org.pitest.functional.FCollection.map;
import static org.pitest.functional.FCollection.mapTo;
Expand Down Expand Up @@ -107,7 +108,12 @@ private void checkForInlinedCode(final Collection<MutationDetails> combined,
private boolean isPossibleToCorrectInlining(
final 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 d572600

Please sign in to comment.