Skip to content

Commit c2786df

Browse files
committed
Correct syntax
1 parent d92bfcf commit c2786df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/src/test/scala/org/apache/spark/util/ClosureCleanerSuite.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,16 @@ private object TestUserClosuresActuallyCleaned {
266266
rdd.mapPartitionsWithIndex { (_, it) => return; it }.count()
267267
}
268268
def testFlatMapWith(rdd: RDD[Int]): Unit = {
269-
rdd.flatMapWith { (it) => return; it }.count()
269+
rdd.flatMapWith { _ => return; Seq() }.count()
270270
}
271271
def testMapWith(rdd: RDD[Int]): Unit = {
272-
rdd.mapWith { (it) => return; it }.count()
272+
rdd.mapWith { _ => return; 0 }.count()
273273
}
274274
def testFilterWith(rdd: RDD[Int]): Unit = {
275-
rdd.filterWith { (it) => return; it }.count()
275+
rdd.filterWith { _ => return; true }.count()
276276
}
277277
def testForEachWith(rdd: RDD[Int]): Unit = {
278-
rdd.foreachWith { (it) => return; it }.count()
278+
rdd.foreachWith { _ => return }
279279
}
280280
def testMapPartitionsWithContext(rdd: RDD[Int]): Unit = {
281281
rdd.mapPartitionsWithContext { (_, it) => return; it }.count()

0 commit comments

Comments
 (0)