This is an automated email from the git hooks/post-receive script.

eugene-guest pushed a commit to annotated tag OpenBSD
in repository testng.

commit 670ae8181ef9525ae22c5601a385b0e48b9c255d
Author: Julien Herr <[email protected]>
Date:   Mon May 11 23:16:18 2015 +0200

    Fix #686 IAnnotationTransformer.transform is called for methods with 
testClass populated
---
 .../testng/internal/annotations/JDK15AnnotationFinder.java   | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git 
a/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java 
b/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java
index edfd80b..5b3fc30 100755
--- a/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java
+++ b/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java
@@ -105,7 +105,7 @@ public class JDK15AnnotationFinder implements 
IAnnotationFinder {
           + annotationClass + "' not found.");
     }
     Annotation annotation = m.getAnnotation(a);
-    return findAnnotation(annotation, annotationClass, m.getDeclaringClass(), 
null, m,
+    return findAnnotation(m.getDeclaringClass(), annotation, annotationClass, 
null, null, m,
         new Pair<>(annotation, m));
   }
 
@@ -127,7 +127,7 @@ public class JDK15AnnotationFinder implements 
IAnnotationFinder {
     if (annotation == null) {
       annotation = testClass.getAnnotation(a);
     }
-    return findAnnotation(annotation, annotationClass, testClass, null, m,
+    return findAnnotation(testClass, annotation, annotationClass, null, null, 
m,
         new Pair<>(annotation, m));
   }
 
@@ -175,7 +175,7 @@ public class JDK15AnnotationFinder implements 
IAnnotationFinder {
           + annotationClass + "' not found.");
     }
     Annotation annotation = findAnnotationInSuperClasses(cls, a);
-    return findAnnotation(annotation, annotationClass, cls, null, null,
+    return findAnnotation(cls, annotation, annotationClass, cls, null, null,
         new Pair<>(annotation, annotationClass));
   }
 
@@ -187,18 +187,18 @@ public class JDK15AnnotationFinder implements 
IAnnotationFinder {
           + annotationClass + "' not found.");
     }
     Annotation annotation = cons.getAnnotation(a);
-    return findAnnotation(annotation, annotationClass, 
cons.getDeclaringClass(), cons, null,
+    return findAnnotation(cons.getDeclaringClass(), annotation, 
annotationClass, null, cons, null,
         new Pair<>(annotation, cons));
   }
 
   private Map<Pair<Annotation, ?>, IAnnotation> m_annotations = 
Maps.newHashMap();
 
-  private <A extends IAnnotation> A findAnnotation(Annotation a,
+  private <A extends IAnnotation> A findAnnotation(Class cls, Annotation a,
       Class<A> annotationClass, Class<?> testClass,
       Constructor<?> testConstructor, Method testMethod, Pair<Annotation, ?> 
p) {
     IAnnotation result = m_annotations.get(p);
     if (result == null) {
-      result = m_tagFactory.createTag(testClass, a, annotationClass, 
m_transformer);
+      result = m_tagFactory.createTag(cls, a, annotationClass, m_transformer);
       m_annotations.put(p, result);
       transform(result, testClass, testConstructor, testMethod);
     }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-java/testng.git

_______________________________________________
pkg-java-commits mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-commits

Reply via email to