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/24 23:54:35 UTC

git commit: SPARK-1494 Don't initialize classes loaded by MIMA excludes, attempt 2

Repository: spark
Updated Branches:
  refs/heads/master bd375094a -> c5c1916dd


SPARK-1494 Don't initialize classes loaded by MIMA excludes, attempt 2

[WIP]

Looks like scala reflection was invoking the static initializer:
```
...
	at org.apache.spark.sql.test.TestSQLContext$.<init>(TestSQLContext.scala:25)
	at org.apache.spark.sql.test.TestSQLContext$.<clinit>(TestSQLContext.scala)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:270)
	at scala.reflect.runtime.JavaMirrors$JavaMirror.javaClass(JavaMirrors.scala:500)
	at scala.reflect.runtime.JavaMirrors$JavaMirror.tryJavaClass(JavaMirrors.scala:505)
	at scala.reflect.runtime.SymbolLoaders$PackageScope.lookupEntry(SymbolLoaders.scala:109)
...
```

Need to make sure that this doesn't change the exclusion semantics before merging.

Author: Michael Armbrust <mi...@databricks.com>

Closes #526 from marmbrus/mima and squashes the following commits:

8168dea [Michael Armbrust] Spurious change
afba262 [Michael Armbrust] Prevent Scala reflection from running static class initializer.


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

Branch: refs/heads/master
Commit: c5c1916dd1b77e22759d58b5b361c56672983e3e
Parents: bd37509
Author: Michael Armbrust <mi...@databricks.com>
Authored: Thu Apr 24 14:54:01 2014 -0700
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Thu Apr 24 14:54:23 2014 -0700

----------------------------------------------------------------------
 .../src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/c5c1916d/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 d9978b0..a433e8e 100644
--- a/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
+++ b/tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala
@@ -50,7 +50,7 @@ object GenerateMIMAIgnore {
            is a module or class. */
 
         val privateAsClass = mirror
-          .staticClass(className)
+          .classSymbol(Class.forName(className, false, classLoader))
           .privateWithin
           .fullName
           .startsWith(packageName)