diff options
author | Michael Armbrust <michael@databricks.com> | 2014-04-24 14:54:01 -0700 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2014-04-24 14:55:53 -0700 |
commit | 5ca01f68197ab3274a7115220949f671dab6dc0f (patch) | |
tree | eef1989f291d2f80823854cf1e7afefaa1c56403 /tools/src | |
parent | 866b03ef4d27b2160563b58d577de29ba6eb4442 (diff) | |
download | spark-5ca01f68197ab3274a7115220949f671dab6dc0f.tar.gz spark-5ca01f68197ab3274a7115220949f671dab6dc0f.tar.bz2 spark-5ca01f68197ab3274a7115220949f671dab6dc0f.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.
(cherry picked from commit c5c1916dd1b77e22759d58b5b361c56672983e3e)
Signed-off-by: Patrick Wendell <pwendell@gmail.com>
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/main/scala/org/apache/spark/tools/GenerateMIMAIgnore.scala | 2 |
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) |