commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [3/7] commons-compress git commit: Avoid NPE when running against pre-release xz's (which are by definition not 1.4)
Date Thu, 06 Jul 2017 07:07:32 GMT
Avoid NPE when running against pre-release xz's (which are by definition not 1.4)

Signed-off-by: Simon Spero <sesuncedu@gmail.com>


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

Branch: refs/heads/master
Commit: 5499fa02b08b8546827a1a055c5af3f0245257d9
Parents: 31ac0e5
Author: Simon Spero <sesuncedu@gmail.com>
Authored: Sun Jun 25 16:56:54 2017 -0400
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Thu Jul 6 09:07:16 2017 +0200

----------------------------------------------------------------------
 .../commons/compress/archivers/sevenz/SevenZOutputFileTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-compress/blob/5499fa02/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
index feb988a..058c9e3 100644
--- a/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
+++ b/src/test/java/org/apache/commons/compress/archivers/sevenz/SevenZOutputFileTest.java
@@ -38,7 +38,8 @@ public class SevenZOutputFileTest extends AbstractTestCase {
 
     static {
         final String version = org.tukaani.xz.XZ.class.getPackage().getImplementationVersion();
-        XZ_BCJ_IS_BUGGY=version.equals("1.4");
+
+        XZ_BCJ_IS_BUGGY= version != null && version.equals("1.4");
         if (XZ_BCJ_IS_BUGGY) {
             System.out.println("XZ version is " + version + " - skipping BCJ tests");
         }


Mime
View raw message