Github user aarondav commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5685#discussion_r29065533
  
    --- Diff: core/src/main/scala/org/apache/spark/util/ClosureCleaner.scala ---
    @@ -167,15 +294,17 @@ private[spark] object ClosureCleaner extends Logging {
         }
       }
     
    -  private def instantiateClass(cls: Class[_], outer: AnyRef, 
inInterpreter: Boolean): AnyRef = {
    -    // logInfo("Creating a " + cls + " with outer = " + outer)
    +  private def instantiateClass(
    +      cls: Class[_],
    +      enclosingObject: AnyRef,
    +      inInterpreter: Boolean): AnyRef = {
         if (!inInterpreter) {
           // This is a bona fide closure class, whose constructor has no 
effects
           // other than to set its fields, so use its constructor
           val cons = cls.getConstructors()(0)
           val params = cons.getParameterTypes.map(createNullValue).toArray
    -      if (outer != null) {
    -        params(0) = outer // First param is always outer object
    +      if (enclosingObject!= null) {
    --- End diff --
    
    nit spcae


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to