Github user kiszk commented on a diff in the pull request:
https://github.com/apache/spark/pull/22399#discussion_r216962458
--- Diff: core/src/test/java/test/org/apache/spark/JavaAPISuite.java ---
@@ -997,10 +997,10 @@ public void binaryFiles() 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 --
nit: space after `try`
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]