Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DDB6B200D2D for ; Fri, 27 Oct 2017 17:42:38 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DC408160BDC; Fri, 27 Oct 2017 15:42:38 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 56E351609E9 for ; Fri, 27 Oct 2017 17:42:38 +0200 (CEST) Received: (qmail 62857 invoked by uid 500); 27 Oct 2017 15:42:37 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 62846 invoked by uid 99); 27 Oct 2017 15:42:37 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Oct 2017 15:42:37 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 10232DFB6F; Fri, 27 Oct 2017 15:42:37 +0000 (UTC) From: vrozov To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #1013: DRILL-5910: Add factory name to ClassNotFoundExcep... Content-Type: text/plain Message-Id: <20171027154237.10232DFB6F@git1-us-west.apache.org> Date: Fri, 27 Oct 2017 15:42:37 +0000 (UTC) archived-at: Fri, 27 Oct 2017 15:42:39 -0000 Github user vrozov commented on a diff in the pull request: https://github.com/apache/drill/pull/1013#discussion_r147445561 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/rpc/security/ClientAuthenticatorProvider.java --- @@ -57,17 +57,17 @@ private ClientAuthenticatorProvider() { // then, custom factories if (customFactories != null) { - try { - final String[] factories = customFactories.split(","); - for (final String factory : factories) { + final String[] factories = customFactories.split(","); + for (final String factory : factories) { + try { final Class clazz = Class.forName(factory); if (AuthenticatorFactory.class.isAssignableFrom(clazz)) { final AuthenticatorFactory instance = (AuthenticatorFactory) clazz.newInstance(); authFactories.put(instance.getSimpleName(), instance); } + } catch (final ClassNotFoundException | IllegalAccessException | InstantiationException e) { + throw new DrillRuntimeException(String.format("Failed to create auth factory '%s'", factory), e); --- End diff -- Not directly related to this PR, but should it continue with the default set of factories if one of custom factories can't be instantiated? ---