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 69a8f89801a22a44c54ffa1ab2ee71f1fb00917c Author: Cedric Beust <[email protected]> Date: Sun May 3 18:56:09 2015 -0700 Warnings. --- .../internal/annotations/IAnnotationFinder.java | 10 +++--- .../annotations/JDK15AnnotationFinder.java | 38 +++++++++++++--------- 2 files changed, 27 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/testng/internal/annotations/IAnnotationFinder.java b/src/main/java/org/testng/internal/annotations/IAnnotationFinder.java index a52b6e5..c3e932f 100755 --- a/src/main/java/org/testng/internal/annotations/IAnnotationFinder.java +++ b/src/main/java/org/testng/internal/annotations/IAnnotationFinder.java @@ -1,11 +1,11 @@ package org.testng.internal.annotations; -import org.testng.ITestNGMethod; -import org.testng.annotations.IAnnotation; - import java.lang.reflect.Constructor; import java.lang.reflect.Method; +import org.testng.ITestNGMethod; +import org.testng.annotations.IAnnotation; + /** * This interface defines how annotations are found on classes, methods @@ -21,7 +21,7 @@ public interface IAnnotationFinder { * @param annotationClass * @return The annotation on the class or null if none found. */ - public <A extends IAnnotation> A findAnnotation(Class cls, Class<A> annotationClass); + public <A extends IAnnotation> A findAnnotation(Class<?> cls, Class<A> annotationClass); /** * @param m @@ -40,7 +40,7 @@ public interface IAnnotationFinder { * If not found, return the annotation on the declaring class. * If not found, return null. */ - public <A extends IAnnotation> A findAnnotation(Constructor cons, Class<A> annotationClass); + public <A extends IAnnotation> A findAnnotation(Constructor<?> cons, Class<A> annotationClass); /** * @return true if the ith parameter of the given method has the annotation @TestInstance. diff --git a/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java b/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java index b7c502a..edfd80b 100755 --- a/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java +++ b/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java @@ -101,17 +101,20 @@ public class JDK15AnnotationFinder implements IAnnotationFinder { public <A extends IAnnotation> A findAnnotation(Method m, Class<A> annotationClass) { final Class<? extends Annotation> a = m_annotationMap.get(annotationClass); if (a == null) { - throw new IllegalArgumentException("Java @Annotation class for '" + annotationClass + "' not found."); + throw new IllegalArgumentException("Java @Annotation class for '" + + annotationClass + "' not found."); } Annotation annotation = m.getAnnotation(a); - return findAnnotation(annotation, annotationClass, m.getDeclaringClass(), null, m, new Pair<>(annotation, m)); + return findAnnotation(annotation, annotationClass, m.getDeclaringClass(), null, m, + new Pair<>(annotation, m)); } @Override public <A extends IAnnotation> A findAnnotation(ITestNGMethod tm, Class<A> annotationClass) { final Class<? extends Annotation> a = m_annotationMap.get(annotationClass); if (a == null) { - throw new IllegalArgumentException("Java @Annotation class for '" + annotationClass + "' not found."); + throw new IllegalArgumentException("Java @Annotation class for '" + + annotationClass + "' not found."); } Method m = tm.getMethod(); Class<?> testClass; @@ -124,12 +127,12 @@ public class JDK15AnnotationFinder implements IAnnotationFinder { if (annotation == null) { annotation = testClass.getAnnotation(a); } - return findAnnotation(annotation, annotationClass, testClass, null, m, new Pair<>(annotation, m)); + return findAnnotation(annotation, annotationClass, testClass, null, m, + new Pair<>(annotation, m)); } - private void transform(IAnnotation a, Class testClass, - Constructor testConstructor, Method testMethod) - { + private void transform(IAnnotation a, Class<?> testClass, + Constructor<?> testConstructor, Method testMethod) { // // Transform @Test // @@ -165,31 +168,34 @@ public class JDK15AnnotationFinder implements IAnnotationFinder { } @Override - public <A extends IAnnotation> A findAnnotation(Class cls, Class<A> annotationClass) { + public <A extends IAnnotation> A findAnnotation(Class<?> cls, Class<A> annotationClass) { final Class<? extends Annotation> a = m_annotationMap.get(annotationClass); if (a == null) { - throw new IllegalArgumentException("Java @Annotation class for '" + annotationClass + "' not found."); + throw new IllegalArgumentException("Java @Annotation class for '" + + annotationClass + "' not found."); } Annotation annotation = findAnnotationInSuperClasses(cls, a); - return findAnnotation(annotation, annotationClass, cls, null, null, new Pair<>(annotation, annotationClass)); + return findAnnotation(annotation, annotationClass, cls, null, null, + new Pair<>(annotation, annotationClass)); } @Override - public <A extends IAnnotation> A findAnnotation(Constructor cons, Class<A> annotationClass) { + public <A extends IAnnotation> A findAnnotation(Constructor<?> cons, Class<A> annotationClass) { final Class<? extends Annotation> a = m_annotationMap.get(annotationClass); if (a == null) { - throw new IllegalArgumentException("Java @Annotation class for '" + annotationClass + "' not found."); + throw new IllegalArgumentException("Java @Annotation class for '" + + annotationClass + "' not found."); } Annotation annotation = cons.getAnnotation(a); - return findAnnotation(annotation, annotationClass, cons.getDeclaringClass(), cons, null, new Pair<>(annotation, cons)); + return findAnnotation(annotation, annotationClass, cons.getDeclaringClass(), cons, null, + new Pair<>(annotation, cons)); } private Map<Pair<Annotation, ?>, IAnnotation> m_annotations = Maps.newHashMap(); private <A extends IAnnotation> A findAnnotation(Annotation a, - Class<A> annotationClass, - Class testClass, Constructor testConstructor, Method testMethod, - Pair<Annotation, ?> p) { + 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); -- 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

