Repository: spark
Updated Branches:
refs/heads/branch-1.0 866b03ef4 -> 5ca01f681
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 <[email protected]>
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.
(cherry picked from commit c5c1916dd1b77e22759d58b5b361c56672983e3e)
Signed-off-by: Patrick Wendell <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5ca01f68
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5ca01f68
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5ca01f68
Branch: refs/heads/branch-1.0
Commit: 5ca01f68197ab3274a7115220949f671dab6dc0f
Parents: 866b03e
Author: Michael Armbrust <[email protected]>
Authored: Thu Apr 24 14:54:01 2014 -0700
Committer: Patrick Wendell <[email protected]>
Committed: Thu Apr 24 14:55:53 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/5ca01f68/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)