Skip to content

Commit 7949b84

Browse files
author
Gary Gregory
committed
Reuse own code
1 parent e03ade0 commit 7949b84

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import java.nio.charset.StandardCharsets;
2727
import java.nio.charset.UnsupportedCharsetException;
2828

29+
import org.apache.commons.io.FileUtils;
2930
import org.junit.jupiter.api.BeforeEach;
3031
import org.junit.jupiter.api.Test;
3132
import org.junit.jupiter.api.io.TempDir;
@@ -48,7 +49,7 @@ public class LockableFileWriterTest {
4849
@BeforeEach
4950
public void setUp() {
5051
file = new File(temporaryFolder, "testlockfile");
51-
lockDir = new File(System.getProperty("java.io.tmpdir"));
52+
lockDir = FileUtils.getTempDirectory();
5253
lockFile = new File(lockDir, file.getName() + ".lck");
5354
altLockDir = temporaryFolder;
5455
altLockFile = new File(altLockDir, file.getName() + ".lck");

0 commit comments

Comments
 (0)