1
1
/*
2
- * Copyright 2002-2018 the original author or authors.
2
+ * Copyright 2002-2019 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.
@@ -94,11 +94,10 @@ public ApplicationListenerMethodAdapter(String beanName, Class<?> targetClass, M
94
94
EventListener ann = AnnotatedElementUtils .findMergedAnnotation (this .targetMethod , EventListener .class );
95
95
this .declaredEventTypes = resolveDeclaredEventTypes (method , ann );
96
96
this .condition = (ann != null ? ann .condition () : null );
97
- this .order = resolveOrder (method );
97
+ this .order = resolveOrder (this . targetMethod );
98
98
}
99
99
100
-
101
- private List <ResolvableType > resolveDeclaredEventTypes (Method method , @ Nullable EventListener ann ) {
100
+ private static List <ResolvableType > resolveDeclaredEventTypes (Method method , @ Nullable EventListener ann ) {
102
101
int count = method .getParameterCount ();
103
102
if (count > 1 ) {
104
103
throw new IllegalStateException (
@@ -123,11 +122,12 @@ private List<ResolvableType> resolveDeclaredEventTypes(Method method, @Nullable
123
122
return Collections .singletonList (ResolvableType .forMethodParameter (method , 0 ));
124
123
}
125
124
126
- private int resolveOrder (Method method ) {
125
+ private static int resolveOrder (Method method ) {
127
126
Order ann = AnnotatedElementUtils .findMergedAnnotation (method , Order .class );
128
127
return (ann != null ? ann .value () : 0 );
129
128
}
130
129
130
+
131
131
/**
132
132
* Initialize this instance.
133
133
*/
0 commit comments