Commit 363cd85b authored by Skylot's avatar Skylot

refactor: remove useless array creation

parent 7bb75271
......@@ -38,7 +38,7 @@ public class ConvertToClsSet {
if (f.isDirectory()) {
addFilesFromDirectory(f, inputFiles);
} else {
InputFile.addFilesFrom(f, inputFiles);
InputFile.addFilesFrom(f, inputFiles, false);
}
}
for (InputFile inputFile : inputFiles) {
......@@ -65,7 +65,7 @@ public class ConvertToClsSet {
addFilesFromDirectory(file, inputFiles);
} else {
try {
InputFile.addFilesFrom(file, inputFiles);
InputFile.addFilesFrom(file, inputFiles, false);
} catch (Exception e) {
LOG.warn("Skip file: {}, load error: {}", file, e.getMessage());
}
......
......@@ -35,9 +35,9 @@ public class InputFile {
private final File file;
private final List<DexFile> dexFiles = new ArrayList<>();
public static void addFilesFrom(File file, List<InputFile> list, boolean... skipSources) throws IOException, DecodeException {
public static void addFilesFrom(File file, List<InputFile> list, boolean skipSources) throws IOException, DecodeException {
InputFile inputFile = new InputFile(file);
inputFile.searchDexFiles(skipSources.length == 0 ? false : skipSources[0]);
inputFile.searchDexFiles(skipSources);
list.add(inputFile);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment