Repository: commons-compress Updated Branches: refs/heads/master f05101e28 -> f668f7bb8
COMPRESS-387 Project: http://git-wip-us.apache.org/repos/asf/commons-compress/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-compress/commit/3112bc30 Tree: http://git-wip-us.apache.org/repos/asf/commons-compress/tree/3112bc30 Diff: http://git-wip-us.apache.org/repos/asf/commons-compress/diff/3112bc30 Branch: refs/heads/master Commit: 3112bc302f32a74c827d672ca84a80091b0700d4 Parents: f05101e Author: tballison <talli...@mitre.org> Authored: Fri Apr 14 13:31:50 2017 -0400 Committer: Stefan Bodewig <bode...@apache.org> Committed: Tue Apr 18 17:00:16 2017 +0200 ---------------------------------------------------------------------- .../org/apache/commons/compress/ArchiveReadTest.java | 11 ++++++++++- .../commons/compress/archivers/LongPathTest.java | 15 ++++++++++++--- .../commons/compress/archivers/LongSymLinkTest.java | 13 ++++++++++--- 3 files changed, 32 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3112bc30/src/test/java/org/apache/commons/compress/ArchiveReadTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/compress/ArchiveReadTest.java b/src/test/java/org/apache/commons/compress/ArchiveReadTest.java index 4d32dfc..5012243 100644 --- a/src/test/java/org/apache/commons/compress/ArchiveReadTest.java +++ b/src/test/java/org/apache/commons/compress/ArchiveReadTest.java @@ -25,6 +25,7 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FilenameFilter; +import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collection; @@ -48,9 +49,17 @@ import org.junit.runners.Parameterized.Parameters; public class ArchiveReadTest extends AbstractTestCase { private static final ClassLoader CLASSLOADER = ArchiveReadTest.class.getClassLoader(); - private static final File ARCDIR = new File(CLASSLOADER.getResource("archives").getFile()); + private static final File ARCDIR; private static final ArrayList<String> FILELIST = new ArrayList<>(); + static { + try { + ARCDIR = new File(CLASSLOADER.getResource("archives").toURI().getPath()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + private final File file; public ArchiveReadTest(final String file){ http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3112bc30/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java b/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java index 6ee3811..46df642 100644 --- a/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java @@ -27,13 +27,12 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.io.FilenameFilter; +import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collection; import junit.framework.AssertionFailedError; - import org.apache.commons.compress.AbstractTestCase; -import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.ar.ArArchiveInputStream; import org.apache.commons.compress.archivers.cpio.CpioArchiveInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; @@ -55,11 +54,21 @@ import org.junit.runners.Parameterized.Parameters; public class LongPathTest extends AbstractTestCase { private static final ClassLoader CLASSLOADER = LongPathTest.class.getClassLoader(); - private static final File ARCDIR = new File(CLASSLOADER.getResource("longpath").getFile()); + private static File ARCDIR; private static final ArrayList<String> FILELIST = new ArrayList<>(); + static { + try { + ARCDIR = new File(CLASSLOADER.getResource("longpath").toURI().getPath()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + private final File file; + + public LongPathTest(final String file){ this.file = new File(ARCDIR, file); } http://git-wip-us.apache.org/repos/asf/commons-compress/blob/3112bc30/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java b/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java index 4694783..d8ed7f7 100644 --- a/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java +++ b/src/test/java/org/apache/commons/compress/archivers/LongSymLinkTest.java @@ -27,13 +27,12 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileReader; import java.io.FilenameFilter; +import java.net.URISyntaxException; import java.util.ArrayList; import java.util.Collection; import junit.framework.AssertionFailedError; - import org.apache.commons.compress.AbstractTestCase; -import org.apache.commons.compress.archivers.ArchiveEntry; import org.apache.commons.compress.archivers.ar.ArArchiveInputStream; import org.apache.commons.compress.archivers.cpio.CpioArchiveInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveEntry; @@ -55,9 +54,17 @@ import org.junit.runners.Parameterized.Parameters; public class LongSymLinkTest extends AbstractTestCase { private static final ClassLoader CLASSLOADER = LongSymLinkTest.class.getClassLoader(); - private static final File ARCDIR = new File(CLASSLOADER.getResource("longsymlink").getFile()); + private static final File ARCDIR; private static final ArrayList<String> FILELIST = new ArrayList<>(); + static { + try { + ARCDIR = new File(CLASSLOADER.getResource("longsymlink").toURI().getPath()); + } catch (URISyntaxException e) { + throw new RuntimeException(e); + } + } + private final File file; public LongSymLinkTest(final String file){