From c94d584f37beb2619efdb7a2d759a4e9bae0827c Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 1 Dec 2014 18:08:11 +0100 Subject: [PATCH] OrderUtils defensively checks for presence of javax.annotation.Priority Issue: SPR-12489 --- .../java/org/springframework/core/annotation/OrderUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java b/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java index 76f07e1f7f..350a7bdf6f 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/OrderUtils.java @@ -40,8 +40,8 @@ public abstract class OrderUtils { priorityAnnotationType = (Class) 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) } }