This commit is contained in:
Johnny Lim
2017-09-30 02:47:40 +09:00
committed by Andy Wilkinson
parent bcbf7b5511
commit bfa291f671
16 changed files with 99 additions and 98 deletions

View File

@@ -228,14 +228,14 @@ class ImportsContextCustomizer implements ContextCustomizer {
private static final Class<?>[] NO_IMPORTS = {};
private static final Set<AnnotationFilter> ANNOTATION_FILTERS;
private static final Set<AnnotationFilter> annotationFilters;
static {
Set<AnnotationFilter> filters = new HashSet<AnnotationFilter>();
filters.add(new JavaLangAnnotationFilter());
filters.add(new KotlinAnnotationFilter());
filters.add(new SpockAnnotationFilter());
ANNOTATION_FILTERS = Collections.unmodifiableSet(filters);
annotationFilters = Collections.unmodifiableSet(filters);
}
private final Set<Object> key;
@@ -274,7 +274,7 @@ class ImportsContextCustomizer implements ContextCustomizer {
}
private boolean isIgnoredAnnotation(Annotation annotation) {
for (AnnotationFilter annotationFilter : ANNOTATION_FILTERS) {
for (AnnotationFilter annotationFilter : annotationFilters) {
if (annotationFilter.isIgnored(annotation)) {
return true;
}