drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adene...@apache.org
Subject [2/3] drill git commit: DRILL-3822: Have PathScanner use own, not thread-context, class loader.
Date Sun, 27 Sep 2015 19:18:48 GMT
DRILL-3822:  Have PathScanner use own, not thread-context, class loader.

this closes #166


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/f7ce86d3
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/f7ce86d3
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/f7ce86d3

Branch: refs/heads/master
Commit: f7ce86d3941af0559c4149718b6b9a523e4c9ab2
Parents: bb111ad
Author: dbarclay <dbarclay@maprtech.com>
Authored: Tue Sep 22 18:04:45 2015 -0700
Committer: adeneche <adeneche@gmail.com>
Committed: Sun Sep 27 12:17:45 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/drill/common/util/PathScanner.java   | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/f7ce86d3/common/src/main/java/org/apache/drill/common/util/PathScanner.java
----------------------------------------------------------------------
diff --git a/common/src/main/java/org/apache/drill/common/util/PathScanner.java b/common/src/main/java/org/apache/drill/common/util/PathScanner.java
index 9ee487b..65bf9b5 100644
--- a/common/src/main/java/org/apache/drill/common/util/PathScanner.java
+++ b/common/src/main/java/org/apache/drill/common/util/PathScanner.java
@@ -130,10 +130,11 @@ public class PathScanner {
    *           to scan for (relative to specified class loaders' classpath roots)
    * @param  returnRootPathname  whether to collect classpath root portion of
    *           URL for each resource instead of full URL of each resource
-   * @param  classLoaders  set of class loaders in which to look up resource;
-   *           none (empty array) to specify to use current thread's context
-   *           class loader and {@link Reflections}'s class loader
-   * @return  ...; empty set if none
+   * @param  classLoaders  not currently used (was: "set of class loaders in
+   *           which to look up resource; none (empty array) to specify to use
+   *           current thread's context class loader and {@link Reflections}'s
+   *           class loader")
+   * @returns  ...; empty set if none
    */
   public static Set<URL> forResource(final String resourcePathname,
                                      final boolean returnRootPathname,
@@ -142,7 +143,7 @@ public class PathScanner {
                  resourcePathname);
     final Set<URL> resultUrlSet = Sets.newHashSet();
 
-    final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+    final ClassLoader classLoader = PathScanner.class.getClassLoader();
     try {
       final Enumeration<URL> resourceUrls =
           classLoader.getResources(resourcePathname);


Mime
View raw message