aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMichael Armbrust <michael@databricks.com>2014-04-24 14:54:01 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-04-24 14:54:23 -0700
commitc5c1916dd1b77e22759d58b5b361c56672983e3e (patch)
tree2b6fff1bcfd377176c5e5937b86b2bdfd05a6f00 /tools
parentbd375094a1480b0ff9c16ab8ddd2dba8731506df (diff)
downloadspark-c5c1916dd1b77e22759d58b5b361c56672983e3e.tar.gz
spark-c5c1916dd1b77e22759d58b5b361c56672983e3e.tar.bz2
spark-c5c1916dd1b77e22759d58b5b361c56672983e3e.zip
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 <michael@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.
Diffstat (limited to 'tools')
-rw-r--r--tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala2
1 files changed, 1 insertions, 1 deletions
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 d9978b02a9..a433e8e2e8 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)