From 0dc4310b470c7e4355c0da67ca3373c3013cc9dd Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Sat, 30 Jul 2016 04:42:38 -0700 Subject: [SPARK-16694][CORE] Use for/foreach rather than map for Unit expressions whose side effects are required ## What changes were proposed in this pull request? Use foreach/for instead of map where operation requires execution of body, not actually defining a transformation ## How was this patch tested? Jenkins Author: Sean Owen Closes #14332 from srowen/SPARK-16694. --- .../scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'streaming') diff --git a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala index 6763ac64da..0349e11224 100644 --- a/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala +++ b/streaming/src/test/scala/org/apache/spark/streaming/ReceiverInputDStreamSuite.scala @@ -34,7 +34,7 @@ class ReceiverInputDStreamSuite extends TestSuiteBase with BeforeAndAfterAll { override def afterAll(): Unit = { try { - StreamingContext.getActive().map { _.stop() } + StreamingContext.getActive().foreach(_.stop()) } finally { super.afterAll() } -- cgit v1.2.3