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
The following commit(s) were added to refs/heads/master by this push:
new a81454e Minor simplification in test.
a81454e is described below
commit a81454e9b8afb085750a4490b81729be6ed5abef
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Aug 4 16:41:29 2021 -0400
Minor simplification in test.
---
src/test/java/org/apache/commons/io/file/PathUtilsTest.java | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
index 6924e5d..b5561a9 100644
--- a/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
+++ b/src/test/java/org/apache/commons/io/file/PathUtilsTest.java
@@ -57,17 +57,14 @@ public class PathUtilsTest extends TestArguments {
public Path tempDir;
private FileSystem openArchive(final Path p, final boolean createNew)
throws IOException {
- final FileSystem archive;
if (createNew) {
final Map<String, String> env = new HashMap<>();
env.put("create", "true");
final URI fileUri = p.toAbsolutePath().toUri();
final URI uri = URI.create("jar:" + fileUri.toASCIIString());
- archive = FileSystems.newFileSystem(uri, env, null);
- } else {
- archive = FileSystems.newFileSystem(p, (ClassLoader) null);
+ return FileSystems.newFileSystem(uri, env, null);
}
- return archive;
+ return FileSystems.newFileSystem(p, (ClassLoader) null);
}
@Test