fix spacing & change warning message to use LOGGER

This commit is contained in:
Connor Tumbleson 2016-02-16 08:18:26 -05:00
parent 4a02f5321c
commit 52e9e8a4d7
2 changed files with 12 additions and 13 deletions

View File

@ -72,8 +72,7 @@ public class ApkDecoder {
public void decode() throws AndrolibException, IOException, DirectoryException {
File outDir = getOutDir();
AndrolibResources.sKeepBroken = mKeepBrokenResources;
AndrolibResources.sKeepBroken = mKeepBrokenResources;
if (!mForceDelete && outDir.exists()) {
throw new OutDirExistsException();

View File

@ -250,17 +250,17 @@ public class ARSCDecoder {
ResResource res = new ResResource(mType, spec, value);
try {
mType.addResource(res);
spec.addResource(res);
} catch (AndrolibException e) {
if (mKeepBroken) {
mType.addResource(res, true);
spec.addResource(res, true);
System.err.println("ignoring exception: " + e);
} else {
throw e;
}
}
mType.addResource(res);
spec.addResource(res);
} catch (AndrolibException ex) {
if (mKeepBroken) {
mType.addResource(res, true);
spec.addResource(res, true);
LOGGER.warning(String.format("Duplicate Resource Detected. Ignoring duplicate: %s", res.toString()));
} else {
throw ex;
}
}
mPkg.addResource(res);
}