Merge branch '2.4.x' into 2.5.x
Closes gh-28565
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -222,6 +222,7 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
filters.add(new JavaLangAnnotationFilter());
|
||||
filters.add(new KotlinAnnotationFilter());
|
||||
filters.add(new SpockAnnotationFilter());
|
||||
filters.add(new JunitAnnotationFilter());
|
||||
ANNOTATION_FILTERS = Collections.unmodifiableSet(filters);
|
||||
}
|
||||
|
||||
@@ -384,4 +385,16 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link AnnotationFilter} for JUnit annotations.
|
||||
*/
|
||||
private static final class JunitAnnotationFilter implements AnnotationFilter {
|
||||
|
||||
@Override
|
||||
public boolean isIgnored(Annotation annotation) {
|
||||
return annotation.annotationType().getName().startsWith("org.junit.");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user