You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/04/23 07:03:12 UTC
git commit: SPARK-1494 Don't initialize classes loaded by MIMA
excludes.
Repository: spark
Updated Branches:
refs/heads/master aa77f8a6a -> 8e9508133
SPARK-1494 Don't initialize classes loaded by MIMA excludes.
[WIP] Just seeing how Jenkins likes this...
Author: Michael Armbrust <mi...@databricks.com>
Closes #494 from marmbrus/mima and squashes the following commits:
6eec616 [Michael Armbrust] Force hive tests to run.
acaf682 [Michael Armbrust] Don't initialize loaded classes.
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/8e950813
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/8e950813
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/8e950813
Branch: refs/heads/master
Commit: 8e950813334dd8545357f59f4ed77c39ee4180b3
Parents: aa77f8a
Author: Michael Armbrust <mi...@databricks.com>
Authored: Tue Apr 22 21:56:15 2014 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Tue Apr 22 22:02:42 2014 -0700
----------------------------------------------------------------------
.../scala/org/apache/spark/tools/GenerateMIMAIgnore.scala | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/8e950813/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
----------------------------------------------------------------------
diff --git a/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala b/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
index 3fb85e1..d9978b0 100644
--- a/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
+++ b/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
@@ -41,7 +41,7 @@ object GenerateMIMAIgnore {
private def classesPrivateWithin(packageName: String): Set[String] = {
- val classes = getClasses(packageName, classLoader)
+ val classes = getClasses(packageName)
val privateClasses = mutable.HashSet[String]()
def isPackagePrivate(className: String) = {
@@ -108,8 +108,7 @@ object GenerateMIMAIgnore {
* Scans all classes accessible from the context class loader which belong to the given package
* and subpackages both from directories and jars present on the classpath.
*/
- private def getClasses(packageName: String,
- classLoader: ClassLoader = Thread.currentThread().getContextClassLoader): Set[String] = {
+ private def getClasses(packageName: String): Set[String] = {
val path = packageName.replace('.', '/')
val resources = classLoader.getResources(path)
@@ -128,7 +127,7 @@ object GenerateMIMAIgnore {
val jar = new JarFile(new File(jarPath))
val enums = jar.entries().map(_.getName).filter(_.startsWith(packageName))
val classes = for (entry <- enums if entry.endsWith(".class"))
- yield Class.forName(entry.replace('/', '.').stripSuffix(".class"))
+ yield Class.forName(entry.replace('/', '.').stripSuffix(".class"), false, classLoader)
classes
}
}