close streams that needed closing (fixes #1143)

This commit is contained in:
Connor Tumbleson 2016-01-22 06:27:23 -06:00
parent d5ca4c12a1
commit 81404c8904
2 changed files with 5 additions and 0 deletions

View File

@ -96,6 +96,9 @@ public class SmaliMod {
dexGen.setDexBuilder(dexBuilder); dexGen.setDexBuilder(dexBuilder);
dexGen.smali_file(); dexGen.smali_file();
is.close();
reader.close();
return dexGen.getNumberOfSyntaxErrors() == 0; return dexGen.getNumberOfSyntaxErrors() == 0;
} }
} }

View File

@ -108,6 +108,8 @@ public class SmaliBuilder {
} }
} }
inStream.close();
try { try {
if (!SmaliMod.assembleSmaliFile(out.toString(),dexBuilder, false, false, inFile)) { if (!SmaliMod.assembleSmaliFile(out.toString(),dexBuilder, false, false, inFile)) {
throw new AndrolibException("Could not smali file: " + fileName); throw new AndrolibException("Could not smali file: " + fileName);