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

    https://github.com/apache/spark/pull/21930#discussion_r206541904
  
    --- Diff: 
core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite2.scala ---
    @@ -538,17 +543,22 @@ class ClosureCleanerSuite2 extends SparkFunSuite with 
BeforeAndAfterAll with Pri
           // As before, this closure is neither serializable nor cleanable
           verifyCleaning(inner1, serializableBefore = false, serializableAfter 
= false)
     
    -      // This closure is no longer serializable because it now has a 
pointer to the outer closure,
    -      // which is itself not serializable because it has a pointer to the 
ClosureCleanerSuite2.
    -      // If we do not clean transitively, we will not null out this 
indirect reference.
    -      verifyCleaning(
    -        inner2, serializableBefore = false, serializableAfter = false, 
transitive = false)
    -
    -      // If we clean transitively, we will find that method `a` does not 
actually reference the
    -      // outer closure's parent (i.e. the ClosureCleanerSuite), so we can 
additionally null out
    -      // the outer closure's parent pointer. This will make `inner2` 
serializable.
    -      verifyCleaning(
    -        inner2, serializableBefore = false, serializableAfter = true, 
transitive = true)
    +      if(!ClosureCleanerSuite2.supportsLMFs) {
    --- End diff --
    
    Nit: space after "if". scalastyle might flag that. While you're at it, what 
about flipping the blocks to avoid a negation? just for a tiny bit of clarity.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to