dongjoon-hyun commented on a change in pull request #24739: 
[SPARK-27875][CORE][SQL][ML][K8S] Wrap all PrintWriter with 
Utils.tryWithResource
URL: https://github.com/apache/spark/pull/24739#discussion_r288845683
 
 

 ##########
 File path: core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
 ##########
 @@ -766,10 +766,10 @@ class SparkSubmitSuite
 
       // Test files and archives (Yarn)
       val f2 = File.createTempFile("test-submit-files-archives", "", tmpDir)
-      val writer2 = new PrintWriter(f2)
-      writer2.println("spark.yarn.dist.files " + files)
-      writer2.println("spark.yarn.dist.archives " + archives)
-      writer2.close()
+      Utils.tryWithResource(new PrintWriter(f2)) { writer2 =>
 
 Review comment:
   `writer2` -> `writer`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to