drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vrozov <...@git.apache.org>
Subject [GitHub] drill pull request #1013: DRILL-5910: Add factory name to ClassNotFoundExcep...
Date Fri, 27 Oct 2017 15:42:42 GMT
Github user vrozov commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1013#discussion_r147443404
  
    --- 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) {
    --- End diff --
    
    catch ReflectiveOperationException.


---

Mime
View raw message