diff options
Diffstat (limited to 'src/main/java/org/testng/internal')
-rwxr-xr-x | src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java | 10 |
1 files changed, 4 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 5b3fc309..fc8cd02f 100755 --- a/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java +++ b/src/main/java/org/testng/internal/annotations/JDK15AnnotationFinder.java @@ -3,8 +3,8 @@ package org.testng.internal.annotations; import java.lang.annotation.Annotation; import java.lang.reflect.Constructor; import java.lang.reflect.Method; -import java.util.Collections; import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.testng.IAnnotationTransformer; import org.testng.IAnnotationTransformer2; @@ -37,7 +37,6 @@ import org.testng.annotations.Optional; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import org.testng.annotations.TestInstance; -import org.testng.collections.Maps; import org.testng.internal.collections.Pair; /** @@ -49,8 +48,9 @@ import org.testng.internal.collections.Pair; public class JDK15AnnotationFinder implements IAnnotationFinder { private JDK15TagFactory m_tagFactory = new JDK15TagFactory(); private Map<Class<? extends IAnnotation>, Class<? extends Annotation>> m_annotationMap = - Collections.synchronizedMap(Maps.<Class<? extends IAnnotation>, - Class<? extends Annotation>>newHashMap()); + new ConcurrentHashMap<>(); + private Map<Pair<Annotation, ?>, IAnnotation> m_annotations = new ConcurrentHashMap<>(); + private IAnnotationTransformer m_transformer = null; @SuppressWarnings({"deprecation"}) @@ -191,8 +191,6 @@ public class JDK15AnnotationFinder implements IAnnotationFinder { new Pair<>(annotation, cons)); } - private Map<Pair<Annotation, ?>, IAnnotation> m_annotations = Maps.newHashMap(); - private <A extends IAnnotation> A findAnnotation(Class cls, Annotation a, Class<A> annotationClass, Class<?> testClass, Constructor<?> testConstructor, Method testMethod, Pair<Annotation, ?> p) { |