drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julienledem <...@git.apache.org>
Subject [GitHub] drill pull request: DRILL-4082: Better error message when multiple...
Date Thu, 12 Nov 2015 23:16:47 GMT
Github user julienledem commented on a diff in the pull request:

    --- Diff: common/src/main/java/org/apache/drill/common/scanner/ClassPathScanner.java ---
    @@ -422,11 +423,16 @@ static ScanResult scan(Collection<URL> pathsToScan, Collection<String>
    -  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
    +                annotated.getClassName(), pathsScanned
    --- End diff --
    I put the URLs on a separate line.
    it's array.toString() which is unhelpful.
    Arrays.toString(array) looks the same as collection.toString()

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.

View raw message