commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject commons-compress git commit: use createTempDirectory rather than custom implementation
Date Wed, 03 Oct 2018 12:34:19 GMT
Repository: commons-compress
Updated Branches:
  refs/heads/master ac3d73153 -> 6e1702e95


use createTempDirectory rather than custom implementation

closes #70


Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/6e1702e9
Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/6e1702e9
Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/6e1702e9

Branch: refs/heads/master
Commit: 6e1702e95e6a487b42b6642b9cd8f3d865151b8f
Parents: ac3d731
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Wed Oct 3 14:33:37 2018 +0200
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Wed Oct 3 14:33:37 2018 +0200

----------------------------------------------------------------------
 .../java/org/apache/commons/compress/AbstractTestCase.java     | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/6e1702e9/src/test/java/org/apache/commons/compress/AbstractTestCase.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/AbstractTestCase.java b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
index 5a52aea..9262aa3 100644
--- a/src/test/java/org/apache/commons/compress/AbstractTestCase.java
+++ b/src/test/java/org/apache/commons/compress/AbstractTestCase.java
@@ -30,6 +30,7 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URI;
 import java.net.URL;
+import java.nio.file.Files;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -61,10 +62,7 @@ public abstract class AbstractTestCase {
     }
 
     public static File mkdir(final String name) throws IOException {
-        final File f = File.createTempFile(name, "");
-        f.delete();
-        f.mkdir();
-        return f;
+        return Files.createTempDirectory(name).toFile();
     }
 
     public static File getFile(final String path) throws IOException {


Mime
View raw message