Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/9106#discussion_r41976775
--- 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 this, and it makes sense, but in the case you describe, the child
classloader had no resource under this name. It seems like it would have
already returned the parent's copy. Is this really the nature of the problem
then or do I misunderstand?
---
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]