Skip to content

Commit c94d584

Browse files
committed
OrderUtils defensively checks for presence of javax.annotation.Priority
Issue: SPR-12489
1 parent 9a71a0c commit c94d584

File tree

1 file changed

+2
-2
lines changed
  • spring-core/src/main/java/org/springframework/core/annotation

1 file changed

+2
-2
lines changed

spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public abstract class OrderUtils {
4040
priorityAnnotationType = (Class<? extends Annotation>)
4141
ClassUtils.forName("javax.annotation.Priority", OrderUtils.class.getClassLoader());
4242
}
43-
catch (ClassNotFoundException ex) {
44-
// javax.annotation.Priority not available
43+
catch (Throwable ex) {
44+
// javax.annotation.Priority not available, or present but not loadable (on JDK 6)
4545
}
4646
}
4747

0 commit comments

Comments
 (0)