From 7e8afc4d8aee82cbab27abca6f5136df636dfbea Mon Sep 17 00:00:00 2001 From: Ben Gruver Date: Sun, 18 Sep 2016 11:16:58 -0700 Subject: [PATCH] Clean up DexInputCommand a bit --- .../src/main/java/org/jf/baksmali/DexInputCommand.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/baksmali/src/main/java/org/jf/baksmali/DexInputCommand.java b/baksmali/src/main/java/org/jf/baksmali/DexInputCommand.java index f69383dd..85109a6b 100644 --- a/baksmali/src/main/java/org/jf/baksmali/DexInputCommand.java +++ b/baksmali/src/main/java/org/jf/baksmali/DexInputCommand.java @@ -112,10 +112,9 @@ public abstract class DexInputCommand extends Command { System.exit(1); } - File dexFile = file; String dexEntry = null; - if (dexFile.getPath().length() < input.length()) { - dexEntry = input.substring(dexFile.getPath().length() + 1); + if (file.getPath().length() < input.length()) { + dexEntry = input.substring(file.getPath().length() + 1); } if (!Strings.isNullOrEmpty(dexEntry)) { @@ -126,14 +125,13 @@ public abstract class DexInputCommand extends Command { } try { - return DexFileFactory.loadDexEntry(dexFile, dexEntry, exactMatch, - Opcodes.forApi(apiLevel)); + return DexFileFactory.loadDexEntry(file, dexEntry, exactMatch, Opcodes.forApi(apiLevel)); } catch (IOException ex) { throw new RuntimeException(ex); } } else { try { - return DexFileFactory.loadDexFile(dexFile, Opcodes.forApi(apiLevel)); + return DexFileFactory.loadDexFile(file, Opcodes.forApi(apiLevel)); } catch (IOException ex) { throw new RuntimeException(ex); }