diff --git a/src/main/java/info/ebenoit/ebul/reflection/Annotations.java b/src/main/java/info/ebenoit/ebul/reflection/Annotations.java index f1d28cc..8418ef2 100644 --- a/src/main/java/info/ebenoit/ebul/reflection/Annotations.java +++ b/src/main/java/info/ebenoit/ebul/reflection/Annotations.java @@ -162,7 +162,7 @@ public final class Annotations { Class< ? super T > current = klass; while ( current != null ) { - if ( current.isAnnotationPresent( annotation ) ) { + if ( current.getDeclaredAnnotation( annotation ) != null ) { return current; } current = current.getSuperclass( ); @@ -189,7 +189,7 @@ public final class Annotations { Class< ? super T > found = null , current = klass; while ( current != null ) { - if ( current.isAnnotationPresent( annotation ) ) { + if ( current.getDeclaredAnnotation( annotation ) != null ) { found = current; } current = current.getSuperclass( );