Skip to content

Commit

Permalink
[openpgp] Use Files.createTempDirectory() instead of using a hardcode…
Browse files Browse the repository at this point in the history
…d path
  • Loading branch information
Flowdalic committed Nov 18, 2024
1 parent 53490dc commit 2e4178d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.security.InvalidAlgorithmParameterException;
import java.security.NoSuchAlgorithmException;
import java.util.Collections;
Expand Down Expand Up @@ -51,7 +52,11 @@ public class SecretKeyBackupHelperTest extends SmackTestSuite {
private static final File basePath;

static {
basePath = new File(org.apache.commons.io.FileUtils.getTempDirectory(), "ox_secret_keys");
try {
basePath = Files.createTempDirectory("ox_secret_keys_").toFile();
} catch (IOException e) {
throw new AssertionError(e);
}
}

@Test
Expand Down

0 comments on commit 2e4178d

Please sign in to comment.