------------------------------------------------------------
revno: 18960
committer: Lars Helge Overland <larshe...@gmail.com>
branch nick: dhis2
timestamp: Tue 2015-04-21 13:06:32 +0200
message:
  Minor
modified:
  
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AnnotationUtils.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to 
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AnnotationUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AnnotationUtils.java	2015-04-21 10:05:10 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/AnnotationUtils.java	2015-04-21 11:06:32 +0000
@@ -46,18 +46,20 @@
      * @param annotationClass the annotation class.
      * @return a list of methods annotated with the given annotation.
      */
-    public static List<Method> getAnnotatedMethods( Object target, Class<? extends Annotation> annotationClass )
+    public static List<Method> getAnnotatedMethods( Object target, Class<? extends Annotation> annotationType )
     {
         final List<Method> methods = new ArrayList<>();
         
-        if ( target == null || annotationClass == null )
+        if ( target == null || annotationType == null )
         {
             return methods;
         }
         
         for ( Method method : target.getClass().getMethods() )
         {
-            if ( method.isAnnotationPresent( annotationClass ) )
+            Annotation a = org.springframework.core.annotation.AnnotationUtils.findAnnotation( method, annotationType );
+            
+            if ( a != null )
             {
                 methods.add( method );
             }

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to