You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/07/24 16:38:26 UTC
[commons-io] 03/21: Reuse own code
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-io.git
commit 7949b8480e6fd968ceadbf5ce6c3c255bc97e2c0
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 24 07:22:12 2022 -0400
Reuse own code
---
src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java b/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
index 3b687e3a..4fb008af 100644
--- a/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
+++ b/src/test/java/org/apache/commons/io/output/LockableFileWriterTest.java
@@ -26,6 +26,7 @@ import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.charset.UnsupportedCharsetException;
+import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.io.TempDir;
@@ -48,7 +49,7 @@ public class LockableFileWriterTest {
@BeforeEach
public void setUp() {
file = new File(temporaryFolder, "testlockfile");
- lockDir = new File(System.getProperty("java.io.tmpdir"));
+ lockDir = FileUtils.getTempDirectory();
lockFile = new File(lockDir, file.getName() + ".lck");
altLockDir = temporaryFolder;
altLockFile = new File(altLockDir, file.getName() + ".lck");