Skip to content

Commit 1bb77b7

Browse files
authored
Merge pull request #1232 from hcoles/feature/restore_interface
ensure interface change is backwards compatible
2 parents 7bdadd8 + cc3ae8e commit 1bb77b7

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

pitest/src/main/java/org/pitest/mutationtest/engine/gregor/MethodMutatorFactory.java

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,28 @@ default MethodVisitor create(MutationContext context,
4545
return null;
4646
}
4747

48-
48+
@Deprecated
49+
default AnnotationVisitor createForAnnotation(NoMethodContext context, AnnotationInfo annotationInfo, AnnotationVisitor next) {
50+
return createForAnnotation((BasicContext) context, annotationInfo, next);
51+
}
4952
default AnnotationVisitor createForAnnotation(BasicContext context, AnnotationInfo annotationInfo, AnnotationVisitor next) {
5053
return null;
5154
}
5255

53-
default boolean skipAnnotation(BasicContext nonMethodContext, AnnotationInfo annotationInfo) {
56+
@Deprecated
57+
default boolean skipAnnotation(NoMethodContext context, AnnotationInfo annotationInfo) {
58+
return skipAnnotation((BasicContext) context, annotationInfo);
59+
}
60+
61+
default boolean skipAnnotation(BasicContext context, AnnotationInfo annotationInfo) {
5462
return false;
5563
}
5664

65+
@Deprecated
66+
default FieldVisitor createForField(NoMethodContext context, FieldInfo fieldInfo, FieldVisitor fieldVisitor) {
67+
return createForField((BasicContext) context, fieldInfo, fieldVisitor);
68+
}
69+
5770
default FieldVisitor createForField(BasicContext context, FieldInfo fieldInfo, FieldVisitor fieldVisitor) {
5871
return null;
5972
}

0 commit comments

Comments
 (0)