Throw warnings instead of exceptions on unknown files inside smali dir.

This commit is contained in:
Ryszard Wiśniewski 2010-08-30 00:04:27 +02:00
parent 10a674dc9e
commit 2064de6a19

View File

@ -22,6 +22,7 @@ import brut.directory.DirectoryException;
import java.io.*;
import java.util.List;
import java.util.ListIterator;
import java.util.logging.Logger;
import org.apache.commons.io.IOUtils;
/**
@ -64,7 +65,8 @@ public class SmaliBuilder {
return;
}
if (! fileName.endsWith(".java")) {
throw new AndrolibException("Unknown file type: " + inFile);
LOGGER.warning("Unknown file type, ignoring: " + inFile);
return;
}
StringBuilder out = new StringBuilder();
@ -105,4 +107,8 @@ public class SmaliBuilder {
private final boolean mDebug;
private DexFileBuilder mDexBuilder;
private final static Logger LOGGER =
Logger.getLogger(SmaliBuilder.class.getName());
}