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 01ddd5bea82..6cd5f487288 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-2016 the original author or authors. + * Copyright 2002-2018 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. @@ -58,6 +58,7 @@ public class AnnotationAwareOrderComparator extends OrderComparator { * elements, in addition to the {@link org.springframework.core.Ordered} * check in the superclass. */ + @Override protected Integer findOrder(Object obj) { // Check for regular Ordered interface Integer order = super.findOrder(obj); @@ -97,6 +98,7 @@ public class AnnotationAwareOrderComparator extends OrderComparator { * annotation: typically, selecting one object over another in case of * multiple matches but only one object to be returned. */ + @Override public Integer getPriority(Object obj) { Integer priority = null; if (obj instanceof Class) { @@ -105,7 +107,7 @@ public class AnnotationAwareOrderComparator extends OrderComparator { else if (obj != null) { priority = OrderUtils.getPriority(obj.getClass()); if (priority == null && obj instanceof DecoratingProxy) { - priority = OrderUtils.getOrder(((DecoratingProxy) obj).getDecoratedClass()); + priority = OrderUtils.getPriority(((DecoratingProxy) obj).getDecoratedClass()); } } return priority;