drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-4082) Better error message when multiple versions of the same function are found by the classpath scanner
Date Thu, 12 Nov 2015 22:32:11 GMT

    [ https://issues.apache.org/jira/browse/DRILL-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15003089#comment-15003089
] 

ASF GitHub Bot commented on DRILL-4082:
---------------------------------------

Github user jaltekruse commented on a diff in the pull request:

    https://github.com/apache/drill/pull/252#discussion_r44725024
  
    --- Diff: common/src/main/java/org/apache/drill/common/scanner/ClassPathScanner.java ---
    @@ -422,11 +423,16 @@ static ScanResult scan(Collection<URL> pathsToScan, Collection<String>
packagePr
         }
       }
     
    -  private static void verifyClassUnicity(List<AnnotatedClassDescriptor> annotatedClasses)
{
    +  private static void verifyClassUnicity(List<AnnotatedClassDescriptor> annotatedClasses,
Collection<URL> pathsScanned) {
         Set<String> scanned = new HashSet<>();
         for (AnnotatedClassDescriptor annotated : annotatedClasses) {
           if (!scanned.add(annotated.getClassName())) {
    -        throw new RuntimeException("BUG: " + annotated.getClassName() + " scanned twice");
    +        throw UserException.functionError()
    +            .message(
    +                "function %s scanned twice in %s\nDo you have conflicting jars on the
classpath?",
    +                annotated.getClassName(), pathsScanned
    --- End diff --
    
    Did you mean to print a list of the URLs? Wouldn't this require use of a Joiner to serialize
the collection?


> Better error message when multiple versions of the same function are found by the classpath
scanner
> ---------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-4082
>                 URL: https://issues.apache.org/jira/browse/DRILL-4082
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Functions - Drill
>            Reporter: Julien Le Dem
>            Assignee: Julien Le Dem
>
> PR:
> https://github.com/apache/drill/pull/252



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message