Github user dbtsai commented on a diff in the pull request:
https://github.com/apache/spark/pull/22246#discussion_r213107072
--- Diff: repl/src/main/scala/org/apache/spark/repl/SparkILoop.scala ---
@@ -148,9 +148,13 @@ class SparkILoop(in0: Option[BufferedReader], out:
JPrintWriter)
*/
private def runClosure(body: () => Boolean): Boolean = {
if (isScala2_11) {
+ val loader =
Utils.classForName("scala.reflect.internal.util.ScalaClassLoader$")
+ .getDeclaredField("MODULE$")
+ .get(null)
+
Utils.classForName("scala.reflect.internal.util.ScalaClassLoader$")
.getDeclaredMethod("savingContextLoader", classOf[() => Boolean])
- .invoke(null, body)
+ .invoke(loader, body)
--- End diff --
@viirya Out of my curiosity, since it's a static method, in theory, in the
`invoke`, the first arg should be `null`. Why do you put the loader in?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]