Skip to content

Commit 47f4d96

Browse files
committed
Only used directly declared instances of Priority annotations and not those of any superclasses.
1 parent 6a63020 commit 47f4d96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inject/src/main/java/io/avaje/inject/spi/DBeanContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private static class SortBean<T> implements Comparable<SortBean<T>> {
246246
int initPriority(Class<? extends Annotation> priorityAnnotation) {
247247
// Avoid adding hard dependency on javax.annotation-api by using reflection
248248
try {
249-
Annotation ann = bean.getClass().getAnnotation(priorityAnnotation);
249+
Annotation ann = bean.getClass().getDeclaredAnnotation(priorityAnnotation);
250250
if (ann != null) {
251251
int priority = (Integer) priorityAnnotation.getMethod("value").invoke(ann);
252252
priorityDefined = true;

0 commit comments

Comments
 (0)