OrderUtils defensively checks for presence of javax.annotation.Priority

Issue: SPR-12489
This commit is contained in:
Juergen Hoeller
2014-12-01 18:08:11 +01:00
parent 9a71a0c6c9
commit c94d584f37

View File

@@ -40,8 +40,8 @@ public abstract class OrderUtils {
priorityAnnotationType = (Class<? extends Annotation>)
ClassUtils.forName("javax.annotation.Priority", OrderUtils.class.getClassLoader());
}
catch (ClassNotFoundException ex) {
// javax.annotation.Priority not available
catch (Throwable ex) {
// javax.annotation.Priority not available, or present but not loadable (on JDK 6)
}
}