Skip to content

Commit

Permalink
chore: use Files, instead of File
Browse files Browse the repository at this point in the history
  • Loading branch information
ctron committed Feb 21, 2024
1 parent ed2345a commit 4fc4116
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public DebianPackageWriter(final OutputStream stream, final BinaryPackageControl
this.ar.write(this.binaryHeader);
this.ar.closeArchiveEntry();

this.dataTemp = File.createTempFile("data", null);
this.dataTemp = Files.createTempFile("data", null).toFile();

this.dataStream = new TarArchiveOutputStream(new GZIPOutputStream(new FileOutputStream(this.dataTemp)));
this.dataStream.setLongFileMode(TarArchiveOutputStream.LONGFILE_GNU);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class BinaryPackageTest {
@SuppressWarnings("deprecation")
@Test
public void test1() throws IOException, InterruptedException {
final File file1 = File.createTempFile("test-1-", ".deb");
final File file2 = File.createTempFile("test-2-", ".deb");
final File file1 = Files.createTempFile("test-1-", ".deb").toFile();
final File file2 = Files.createTempFile("test-2-", ".deb").toFile();

final Instant now = Instant.now();
final Supplier<Instant> timestampProvider = () -> now;
Expand Down

0 comments on commit 4fc4116

Please sign in to comment.