You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by go...@apache.org on 2019/09/04 00:21:18 UTC
[hive] branch master updated: HIVE-22161: UDF: FunctionRegistry
synchronizes on org.apache.hadoop.hive.ql.udf.UDFType class (Gopal V,
reviewed by Ashutosh Chauhan)
This is an automated email from the ASF dual-hosted git repository.
gopalv pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new ebcc9bc HIVE-22161: UDF: FunctionRegistry synchronizes on org.apache.hadoop.hive.ql.udf.UDFType class (Gopal V, reviewed by Ashutosh Chauhan)
ebcc9bc is described below
commit ebcc9bc56ce92877f5e695b5c15654e380c46286
Author: Gopal V <go...@apache.org>
AuthorDate: Tue Sep 3 17:20:07 2019 -0700
HIVE-22161: UDF: FunctionRegistry synchronizes on org.apache.hadoop.hive.ql.udf.UDFType class (Gopal V, reviewed by Ashutosh Chauhan)
Signed-off-by: Gopal V <go...@apache.org>
---
.../java/org/apache/hive/common/util/AnnotationUtils.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/common/src/java/org/apache/hive/common/util/AnnotationUtils.java b/common/src/java/org/apache/hive/common/util/AnnotationUtils.java
index a73faca..bfbaea6 100644
--- a/common/src/java/org/apache/hive/common/util/AnnotationUtils.java
+++ b/common/src/java/org/apache/hive/common/util/AnnotationUtils.java
@@ -23,17 +23,15 @@ import java.lang.reflect.Method;
public class AnnotationUtils {
- // to avoid https://bugs.openjdk.java.net/browse/JDK-7122142
+ // until JDK8, this had a lock around annotationClass to avoid
+ // https://bugs.openjdk.java.net/browse/JDK-7122142
public static <T extends Annotation> T getAnnotation(Class<?> clazz, Class<T> annotationClass) {
- synchronized (annotationClass) {
- return clazz.getAnnotation(annotationClass);
- }
+ return clazz.getAnnotation(annotationClass);
}
- // to avoid https://bugs.openjdk.java.net/browse/JDK-7122142
+ // until JDK8, this had a lock around annotationClass to avoid
+ // https://bugs.openjdk.java.net/browse/JDK-7122142
public static <T extends Annotation> T getAnnotation(Method method, Class<T> annotationClass) {
- synchronized (annotationClass) {
- return method.getAnnotation(annotationClass);
- }
+ return method.getAnnotation(annotationClass);
}
}