Polishing

This commit is contained in:
Juergen Hoeller
2014-07-28 22:05:40 +02:00
parent a3163ceb88
commit 8cc0fa5ae1
6 changed files with 40 additions and 38 deletions

View File

@@ -48,7 +48,7 @@ import org.springframework.util.ReflectionUtils;
*/
abstract class AbstractRecursiveAnnotationVisitor extends AnnotationVisitor {
protected final Log logger = LogFactory.getLog(this.getClass());
protected final Log logger = LogFactory.getLog(getClass());
protected final AnnotationAttributes attributes;
@@ -94,10 +94,10 @@ abstract class AbstractRecursiveAnnotationVisitor extends AnnotationVisitor {
}
}
catch (ClassNotFoundException ex) {
this.logger.debug("Failed to classload enum type while reading annotation metadata", ex);
logger.debug("Failed to classload enum type while reading annotation metadata", ex);
}
catch (IllegalAccessException ex) {
this.logger.warn("Could not access enum value while reading annotation metadata", ex);
logger.warn("Could not access enum value while reading annotation metadata", ex);
}
return valueToUse;
}
@@ -169,7 +169,6 @@ class RecursiveAnnotationAttributesVisitor extends AbstractRecursiveAnnotationVi
private final String annotationType;
public RecursiveAnnotationAttributesVisitor(String annotationType, AnnotationAttributes attributes,
ClassLoader classLoader) {
super(classLoader, attributes);
@@ -183,8 +182,8 @@ class RecursiveAnnotationAttributesVisitor extends AbstractRecursiveAnnotationVi
doVisitEnd(annotationClass);
}
catch (ClassNotFoundException ex) {
this.logger.debug("Failed to class-load type while reading annotation metadata. "
+ "This is a non-fatal error, but certain annotation metadata may be unavailable.", ex);
logger.debug("Failed to class-load type while reading annotation metadata. " +
"This is a non-fatal error, but certain annotation metadata may be unavailable.", ex);
}
}
@@ -246,7 +245,6 @@ final class AnnotationAttributesReadingVisitor extends RecursiveAnnotationAttrib
private final Map<String, Set<String>> metaAnnotationMap;
public AnnotationAttributesReadingVisitor(String annotationType,
MultiValueMap<String, AnnotationAttributes> attributesMap, Map<String, Set<String>> metaAnnotationMap,
ClassLoader classLoader) {
@@ -257,7 +255,6 @@ final class AnnotationAttributesReadingVisitor extends RecursiveAnnotationAttrib
this.metaAnnotationMap = metaAnnotationMap;
}
@Override
public void doVisitEnd(Class<?> annotationClass) {
super.doVisitEnd(annotationClass);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 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.
@@ -19,8 +19,8 @@ package org.springframework.core.type.filter;
import java.io.IOException;
import org.springframework.core.type.ClassMetadata;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
/**
* Type filter that exposes a

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2014 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.
@@ -29,8 +29,8 @@ import org.aspectj.weaver.patterns.PatternParser;
import org.aspectj.weaver.patterns.SimpleScope;
import org.aspectj.weaver.patterns.TypePattern;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
/**
* Type filter that uses AspectJ type pattern for matching.