jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tri...@apache.org
Subject svn commit: r1569949 - in /jackrabbit/commons/filevault/trunk/vault-core/src: main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/subtest.zip
Date Wed, 19 Feb 2014 22:56:29 GMT
Author: tripod
Date: Wed Feb 19 22:56:29 2014
New Revision: 1569949

URL: http://svn.apache.org/r1569949
Log:
JCRVLT-36 IllegalArgumentException while extracting subpackages

Modified:
    jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
    jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/subtest.zip

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java?rev=1569949&r1=1569948&r2=1569949&view=diff
==============================================================================
--- jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
(original)
+++ jackrabbit/commons/filevault/trunk/vault-core/src/main/java/org/apache/jackrabbit/vault/packaging/impl/JcrPackageImpl.java
Wed Feb 19 22:56:29 2014
@@ -319,7 +319,12 @@ public class JcrPackageImpl implements J
      */
     public VaultPackage getPackage() throws RepositoryException, IOException {
         if (pack == null) {
-            long size = getSize();
+            long size = -1;
+            try {
+                size = getData().getLength();
+            } catch (RepositoryException e) {
+                // ignore
+            }
             if (size >= 0 && size < 1024*1024) {
                 MemoryArchive archive = new MemoryArchive(false);
                 InputStream in = getData().getStream();

Modified: jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/subtest.zip
URL: http://svn.apache.org/viewvc/jackrabbit/commons/filevault/trunk/vault-core/src/test/resources/org/apache/jackrabbit/vault/packaging/integration/testpackages/subtest.zip?rev=1569949&r1=1569948&r2=1569949&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message