File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
inject/src/main/java/io/avaje/inject/spi Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -106,10 +106,6 @@ public <T> List<T> sortByPriority(List<T> list) {
106
106
107
107
@ Override
108
108
public <T > List <T > sortByPriority (List <T > list , final Class <? extends Annotation > priorityAnnotation ) {
109
- if (priorityAnnotation == null ) {
110
- // priority annotation not on the classpath
111
- return list ;
112
- }
113
109
boolean priorityUsed = false ;
114
110
List <SortBean <T >> tempList = new ArrayList <>(list .size ());
115
111
for (T bean : list ) {
@@ -250,7 +246,7 @@ private static class SortBean<T> implements Comparable<SortBean<T>> {
250
246
int initPriority (Class <? extends Annotation > priorityAnnotation ) {
251
247
// Avoid adding hard dependency on javax.annotation-api by using reflection
252
248
try {
253
- Annotation ann = bean .getClass ().getAnnotation (priorityAnnotation );
249
+ Annotation ann = bean .getClass ().getDeclaredAnnotation (priorityAnnotation );
254
250
if (ann != null ) {
255
251
int priority = (Integer ) priorityAnnotation .getMethod ("value" ).invoke (ann );
256
252
priorityDefined = true ;
You can’t perform that action at this time.
0 commit comments