[testng] 149/160: Use ConcurrentHashMap.
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:22:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag testng-6.9.5
in repository testng.
commit f644d1ed53f10a35f6d87ef22540a487a422d4be
Author: Cedric Beust <cedric at beust.com>
Date: Fri Jul 10 07:57:13 2015 -0700
Use ConcurrentHashMap.
---
.../org/testng/internal/annotations/JDK15AnnotationFinder.java | 10 ++++------
1 file 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 5b3fc30..fc8cd02 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) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git
More information about the pkg-java-commits
mailing list