Github user pwendell commented on a diff in the pull request:
https://github.com/apache/spark/pull/5685#discussion_r29392231
--- Diff: core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala ---
@@ -184,19 +335,17 @@ private[spark] object ClosureCleaner extends Logging {
val parentCtor = classOf[java.lang.Object].getDeclaredConstructor()
val newCtor = rf.newConstructorForSerialization(cls, parentCtor)
val obj = newCtor.newInstance().asInstanceOf[AnyRef]
- if (outer != null) {
- // logInfo("3: Setting $outer on " + cls + " to " + outer);
+ if (enclosingObject != null) {
val field = cls.getDeclaredField("$outer")
field.setAccessible(true)
- field.set(obj, outer)
+ field.set(obj, enclosingObject)
}
obj
}
}
}
-private[spark]
-class ReturnStatementFinder extends ClassVisitor(ASM4) {
+private class ReturnStatementFinder extends ClassVisitor(ASM4) {
override def visitMethod(access: Int, name: String, desc: String,
sig: String, exceptions: Array[String]): MethodVisitor = {
if (name.contains("apply")) {
--- End diff --
We can do this later, but if possible we should try to return the line
number of the return statement if possible (is that even possible?).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]