Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/9106#discussion_r41984186
--- Diff:
core/src/main/scala/org/apache/spark/util/MutableURLClassLoader.scala ---
@@ -82,14 +84,9 @@ private[spark] class ChildFirstURLClassLoader(urls:
Array[URL], parent: ClassLoa
}
override def getResources(name: String): Enumeration[URL] = {
- val urls = super.findResources(name)
- val res =
- if (urls != null && urls.hasMoreElements()) {
- urls
- } else {
- parentClassLoader.getResources(name)
- }
- res
+ val childUrls = super.findResources(name).asScala
+ val parentUrls = parentClassLoader.getResources(name).asScala
+ (childUrls ++ parentUrls).asJavaEnumeration
--- End diff --
I get it. This makes sense, since the general contract is to return all
visible resources under the name.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]