Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/22399#discussion_r216962519 --- Diff: core/src/test/java/test/org/apache/spark/JavaAPISuite.java --- @@ -1018,10 +1018,10 @@ public void binaryFilesCaching() throws Exception { FileOutputStream fos1 = new FileOutputStream(file1); - FileChannel channel1 = fos1.getChannel(); - ByteBuffer bbuf = ByteBuffer.wrap(content1); - channel1.write(bbuf); - channel1.close(); + try(FileChannel channel1 = fos1.getChannel()) { --- End diff -- ditto
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org