diff --git a/pitest-entry/src/main/java/org/pitest/mutationtest/build/DefaultTestPrioritiser.java b/pitest-entry/src/main/java/org/pitest/mutationtest/build/DefaultTestPrioritiser.java index ddb501c2a..cd5c90281 100644 --- a/pitest-entry/src/main/java/org/pitest/mutationtest/build/DefaultTestPrioritiser.java +++ b/pitest-entry/src/main/java/org/pitest/mutationtest/build/DefaultTestPrioritiser.java @@ -22,7 +22,7 @@ */ public class DefaultTestPrioritiser implements TestPrioritiser { - private static final int TIME_WEIGHTING_FOR_DIRECT_UNIT_TESTS = 1000; + private static final int TIME_WEIGHTING_FOR_DIRECT_UNIT_TESTS = 1000; private final CoverageDatabase coverage; diff --git a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/GregorMutater.java b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/GregorMutater.java index 70456029d..1df8c795c 100644 --- a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/GregorMutater.java +++ b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/GregorMutater.java @@ -102,7 +102,7 @@ public Mutant getMutation(final MutationIdentifier id) { this.computeCache, FrameOptions.pickFlags(bytes.get())); final MutatingClassVisitor mca = new MutatingClassVisitor(w, context, filterMethods(), FCollection.filter(this.mutators, - isMutatorFor(id))); + m -> m.isMutatorFor(id))); reader.accept(mca, ClassReader.EXPAND_FRAMES); final List details = context.getMutationDetails(context @@ -112,11 +112,6 @@ public Mutant getMutation(final MutationIdentifier id) { } - private static Predicate isMutatorFor( - final MutationIdentifier id) { - return a -> id.getMutator().equals(a.getGloballyUniqueId()); - } - private Predicate filterMethods() { return and(this.filter, filterSyntheticMethods()); } diff --git a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/MethodMutatorFactory.java b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/MethodMutatorFactory.java index 550b39822..970d8c223 100644 --- a/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/MethodMutatorFactory.java +++ b/pitest/src/main/java/org/pitest/mutationtest/engine/gregor/MethodMutatorFactory.java @@ -15,6 +15,7 @@ package org.pitest.mutationtest.engine.gregor; import org.objectweb.asm.MethodVisitor; +import org.pitest.mutationtest.engine.MutationIdentifier; import org.pitest.plugin.ClientClasspathPlugin; /** @@ -61,4 +62,8 @@ default String description() { return getName(); } + default boolean isMutatorFor(MutationIdentifier id) { + return id.getMutator().equals(getGloballyUniqueId()); + } + }