Pass exception back to user

- check object is not null before closing
 - refs #1160
This commit is contained in:
Connor Tumbleson 2017-05-05 07:46:56 -04:00
parent 7947f115b0
commit e2f77aac18
No known key found for this signature in database
GPG Key ID: C3CC0A201EC7DA75
2 changed files with 5 additions and 1 deletions

View File

@ -167,6 +167,8 @@ public class ApkDecoder {
mAndrolib.recordUncompressedFiles(mApkFile, mUncompressedFiles); mAndrolib.recordUncompressedFiles(mApkFile, mUncompressedFiles);
mAndrolib.writeOriginalFiles(mApkFile, outDir); mAndrolib.writeOriginalFiles(mApkFile, outDir);
writeMetaFile(); writeMetaFile();
} catch (Exception ex) {
throw ex;
} finally { } finally {
try { try {
mApkFile.close(); mApkFile.close();

View File

@ -56,8 +56,10 @@ public class ExtFile extends File {
} }
public void close() throws IOException { public void close() throws IOException {
if (mDirectory != null) {
mDirectory.close(); mDirectory.close();
} }
}
private Directory mDirectory; private Directory mDirectory;
} }