summaryrefslogtreecommitdiff
path: root/src/main/java/com/android
diff options
context:
space:
mode:
authorChris Warrington <cmw@google.com>2017-04-06 15:28:03 +0100
committerChris Warrington <cmw@google.com>2017-04-12 11:16:28 +0100
commit2114d2f8f540b6634c9431d80adac4960fefba07 (patch)
treec5869a2ee53bf74a687b0d45e4fe567639d58ce1 /src/main/java/com/android
parentb42956b73d85ce5d41087450f53c09be7b137683 (diff)
downloadapkzlib-2114d2f8f540b6634c9431d80adac4960fefba07.tar.gz
Switch from out of process AAPT2 to jni.
This depends on an updated aapt2 prebuilt. Test: existing gradle integration tests. Bug: 36165697 Change-Id: I1d0dbf2853db4111417421ebf0591659671e7b14
Diffstat (limited to 'src/main/java/com/android')
-rw-r--r--src/main/java/com/android/apkzlib/zip/ZFile.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/com/android/apkzlib/zip/ZFile.java b/src/main/java/com/android/apkzlib/zip/ZFile.java
index c92e99b..396d8ac 100644
--- a/src/main/java/com/android/apkzlib/zip/ZFile.java
+++ b/src/main/java/com/android/apkzlib/zip/ZFile.java
@@ -25,6 +25,7 @@ import com.android.apkzlib.zip.utils.CloseableByteSource;
import com.android.apkzlib.zip.utils.LittleEndianUtils;
import com.google.common.base.Preconditions;
import com.google.common.base.Verify;
+import com.google.common.base.VerifyException;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
@@ -457,6 +458,10 @@ public class ZFile implements Closeable {
throw e;
} catch (IOException e) {
throw new IOException("Failed to read zip file '" + file.getAbsolutePath() + "'.", e);
+ } catch (IllegalStateException | IllegalArgumentException | VerifyException e) {
+ throw new RuntimeException(
+ "Internal error when trying to read zip file '" + file.getAbsolutePath() + "'.",
+ e);
}
}