This is an automated email from the ASF dual-hosted git repository. shaofengshi pushed a commit to branch 2.4.x in repository https://gitbox.apache.org/repos/asf/kylin.git
commit e86e910cacfab61682b41e52c499f820270f12ad Author: yiming.xu <100650...@qq.com> AuthorDate: Mon May 28 21:16:27 2018 +0800 KYLIN-3390 QueryInterceptorUtil.queryInterceptors is not thread safe Signed-off-by: shaofengshi <shaofeng...@apache.org> --- .../org/apache/kylin/query/security/QueryInterceptorUtil.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/query/src/main/java/org/apache/kylin/query/security/QueryInterceptorUtil.java b/query/src/main/java/org/apache/kylin/query/security/QueryInterceptorUtil.java index 6ce4c8e..3641483 100644 --- a/query/src/main/java/org/apache/kylin/query/security/QueryInterceptorUtil.java +++ b/query/src/main/java/org/apache/kylin/query/security/QueryInterceptorUtil.java @@ -26,11 +26,7 @@ import org.apache.kylin.common.util.ClassUtil; public class QueryInterceptorUtil { private static List<QueryInterceptor> queryInterceptors = new ArrayList<>(); - - private static void setQueryInterceptor() { - if (queryInterceptors.size() > 0) { - return; - } + static { String[] classes = KylinConfig.getInstanceFromEnv().getQueryInterceptors(); for (String clz : classes) { try { @@ -43,8 +39,6 @@ public class QueryInterceptorUtil { } public static List<QueryInterceptor> getQueryInterceptors() { - setQueryInterceptor(); return queryInterceptors; } - } \ No newline at end of file