File tree 2 files changed +38
-1
lines changed
main/java/org/springframework/core/annotation
test/java/org/springframework/core/annotation
2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2006 the original author or authors.
2
+ * Copyright 2002-2012 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
27
27
* annotation value (if any).
28
28
*
29
29
* @author Juergen Hoeller
30
+ * @author Oliver Gierke
30
31
* @since 2.0.1
31
32
* @see org.springframework.core.Ordered
32
33
* @see Order
33
34
*/
34
35
public class AnnotationAwareOrderComparator extends OrderComparator {
35
36
37
+ public static AnnotationAwareOrderComparator INSTANCE = new AnnotationAwareOrderComparator ();
38
+
36
39
@ Override
37
40
protected int getOrder (Object obj ) {
38
41
if (obj instanceof Ordered ) {
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright 2012 the original author or authors.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ package org .springframework .core .annotation ;
17
+
18
+ import static org .hamcrest .CoreMatchers .*;
19
+ import static org .junit .Assert .*;
20
+
21
+ import org .junit .Test ;
22
+
23
+ /**
24
+ * Unit tests for {@link AnnotationAwareOrderComparator}.
25
+ *
26
+ * @author Oliver Gierke
27
+ */
28
+ public class AnnotationAwareOrderComparatorTests {
29
+
30
+ @ Test
31
+ public void instanceVariableIsAnAnnotationAwareOrderComparator () {
32
+ assertThat (AnnotationAwareOrderComparator .INSTANCE , is (instanceOf (AnnotationAwareOrderComparator .class )));
33
+ }
34
+ }
You can’t perform that action at this time.
0 commit comments