Skip to content

Commit 8d67a98

Browse files
committed
Correctly delegate to OrderUtils.getPriority for DecoratingProxy
Issue: SPR-16739
1 parent c09e104 commit 8d67a98

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -58,6 +58,7 @@ public class AnnotationAwareOrderComparator extends OrderComparator {
5858
* elements, in addition to the {@link org.springframework.core.Ordered}
5959
* check in the superclass.
6060
*/
61+
@Override
6162
protected Integer findOrder(Object obj) {
6263
// Check for regular Ordered interface
6364
Integer order = super.findOrder(obj);
@@ -97,6 +98,7 @@ else if (obj != null) {
9798
* annotation: typically, selecting one object over another in case of
9899
* multiple matches but only one object to be returned.
99100
*/
101+
@Override
100102
public Integer getPriority(Object obj) {
101103
Integer priority = null;
102104
if (obj instanceof Class) {
@@ -105,7 +107,7 @@ public Integer getPriority(Object obj) {
105107
else if (obj != null) {
106108
priority = OrderUtils.getPriority(obj.getClass());
107109
if (priority == null && obj instanceof DecoratingProxy) {
108-
priority = OrderUtils.getOrder(((DecoratingProxy) obj).getDecoratedClass());
110+
priority = OrderUtils.getPriority(((DecoratingProxy) obj).getDecoratedClass());
109111
}
110112
}
111113
return priority;

0 commit comments

Comments
 (0)