You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by bo...@apache.org on 2017/04/18 15:02:35 UTC

[1/2] commons-compress git commit: COMPRESS-387

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 <ta...@mitre.org>
Authored: Fri Apr 14 13:31:50 2017 -0400
Committer: Stefan Bodewig <bo...@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){


[2/2] commons-compress git commit: COMPRESS-387 record changes

Posted by bo...@apache.org.
COMPRESS-387 record changes

closes #19


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

Branch: refs/heads/master
Commit: f668f7bb87d3b0a0ad0642acdbf56d6e2fb18476
Parents: 3112bc3
Author: Stefan Bodewig <bo...@apache.org>
Authored: Tue Apr 18 17:02:12 2017 +0200
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Tue Apr 18 17:02:12 2017 +0200

----------------------------------------------------------------------
 src/changes/changes.xml                                           | 3 +++
 .../java/org/apache/commons/compress/archivers/LongPathTest.java  | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/f668f7bb/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 055d11b..8b1bedc 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -76,6 +76,9 @@ The <action> type attribute can be add,update,fix,remove.
         Add static detect(InputStream in) to CompressorStreamFactory
         and ArchiveStreamFactory
       </action>
+      <action issue="COMPRESS-387" type="fix" date="2017-04-18">
+        Make unit tests work on Windows paths with spaces in their names.
+      </action>
     </release>
     <release version="1.13" date="2016-12-29"
              description="Release 1.13 - API compatible to 1.12 but requires Java 7 at runtime.">

http://git-wip-us.apache.org/repos/asf/commons-compress/blob/f668f7bb/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 46df642..45125f3 100644
--- a/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/LongPathTest.java
@@ -54,7 +54,7 @@ import org.junit.runners.Parameterized.Parameters;
 public class LongPathTest extends AbstractTestCase {
 
     private static final ClassLoader CLASSLOADER = LongPathTest.class.getClassLoader();
-    private static File ARCDIR;
+    private static final File ARCDIR;
     private static final ArrayList<String> FILELIST = new ArrayList<>();
 
     static {