ASM annotation visitor logs IllegalAccessException at debug level only

Issue: SPR-15442
This commit is contained in:
Juergen Hoeller
2017-04-12 18:05:30 +02:00
parent fcdf3900b9
commit 4838f06d5d

View File

@@ -17,6 +17,7 @@
package org.springframework.core.type.classreading; package org.springframework.core.type.classreading;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.security.AccessControlException;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
@@ -84,11 +85,11 @@ abstract class AbstractRecursiveAnnotationVisitor extends AnnotationVisitor {
valueToUse = enumConstant.get(null); valueToUse = enumConstant.get(null);
} }
} }
catch (ClassNotFoundException ex) { catch (ClassNotFoundException | NoClassDefFoundError ex) {
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) { catch (IllegalAccessException | AccessControlException ex) {
logger.warn("Could not access enum value while reading annotation metadata", ex); logger.debug("Could not access enum value while reading annotation metadata", ex);
} }
return valueToUse; return valueToUse;
} }