diff --git a/core/src/main/scala/org/apache/spark/HttpFileServer.scala b/core/src/main/scala/org/apache/spark/HttpFileServer.scala index 14721167ea7f1..7e706bcc42f04 100644 --- a/core/src/main/scala/org/apache/spark/HttpFileServer.scala +++ b/core/src/main/scala/org/apache/spark/HttpFileServer.scala @@ -56,10 +56,8 @@ private[spark] class HttpFileServer( try { Utils.deleteRecursively(baseDir) } catch { - case e: Exception => { - val path = baseDir.getAbsolutePath - logWarning(s"Exception while deleting Spark temp dir: $path", e) - } + case e: Exception => + logWarning(s"Exception while deleting Spark temp dir: ${baseDir.getAbsolutePath}", e) } }