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
1 changed files with 4 additions and 3 deletions

View File

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