Skip to content

Commit

Permalink
[Java] Clean-up of tmp files created in CrossLanguageTest (apache#1277)
Browse files Browse the repository at this point in the history
## What do these changes do?
Once the test is completed, this change deletes the temporary file
created in CrossLanguageTest.

## Related issue number
apache#1276
  • Loading branch information
nandakumar131 authored Dec 29, 2023
1 parent 26f1fc3 commit 5eafd5f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import java.nio.channels.Channels;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardOpenOption;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -100,8 +99,8 @@ public void testMapEncoder() throws IOException {
RowEncoder<A> encoder = Encoders.bean(A.class);
System.out.println("Schema: " + encoder.schema());
Assert.assertEquals(a, encoder.decode(encoder.encode(a)));
Files.deleteIfExists(Paths.get("foo"));
Path dataFile = Files.createFile(Paths.get("foo"));
Path dataFile = Files.createTempFile("foo", "tmp");
dataFile.toFile().deleteOnExit();
{
Files.write(dataFile, encoder.encode(a));
ImmutableList<String> command =
Expand Down

0 comments on commit 5eafd5f

Please sign in to comment.