From 08c67cf0455972fa19c1d3633dd752dcdb984151 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 7 Mar 2015 22:35:49 +0100 Subject: [PATCH] Polish AnnotationAwareOrderComparator --- .../AnnotationAwareOrderComparator.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java index 13d2382b97b..d2295bb7dd5 100644 --- a/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java +++ b/spring-core/src/main/java/org/springframework/core/annotation/AnnotationAwareOrderComparator.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,8 +27,8 @@ import org.springframework.core.OrderComparator; /** * {@link java.util.Comparator} implementation that checks Spring's * {@link org.springframework.core.Ordered} interface as well as the - * {@link Order} annotation and the {@link javax.annotation.Priority} - * annotation, with an order value provided by an {@code Ordered} + * {@link Order @Order} and {@link javax.annotation.Priority @Priority} + * annotations, with an order value provided by an {@code Ordered} * instance overriding a statically defined annotation value (if any). * * @author Juergen Hoeller @@ -36,7 +36,7 @@ import org.springframework.core.OrderComparator; * @author Stephane Nicoll * @since 2.0.1 * @see org.springframework.core.Ordered - * @see Order + * @see org.springframework.core.annotation.Order * @see javax.annotation.Priority */ public class AnnotationAwareOrderComparator extends OrderComparator { @@ -61,7 +61,7 @@ public class AnnotationAwareOrderComparator extends OrderComparator { // Check for @Order annotation on various kinds of elements if (obj instanceof Class) { - return OrderUtils.getOrder((Class) obj); + return OrderUtils.getOrder((Class) obj); } else if (obj instanceof Method) { Order ann = AnnotationUtils.findAnnotation((Method) obj, Order.class); @@ -83,14 +83,14 @@ public class AnnotationAwareOrderComparator extends OrderComparator { } /** - * This implementation checks retrieves a {@link javax.annotation.Priority} - * value, allowing for additional semantics over the regular {@link Order} + * This implementation retrieves an @{@link javax.annotation.Priority} + * value, allowing for additional semantics over the regular @{@link Order} * annotation: typically, selecting one object over another in case of * multiple matches but only one object to be returned. */ public Integer getPriority(Object obj) { if (obj instanceof Class) { - return OrderUtils.getPriority((Class) obj); + return OrderUtils.getPriority((Class) obj); } else if (obj != null) { return OrderUtils.getPriority(obj.getClass());