refactor: extract common element from if statement

This commit is contained in:
Connor Tumbleson 2021-09-05 06:57:39 -04:00 committed by Connor Tumbleson
parent d48b407f5b
commit 3118b54632

View File

@ -157,7 +157,6 @@ public class Main {
} }
if (cli.hasOption("o") || cli.hasOption("output")) { if (cli.hasOption("o") || cli.hasOption("output")) {
outDir = new File(cli.getOptionValue("o")); outDir = new File(cli.getOptionValue("o"));
decoder.setOutDir(outDir);
} else { } else {
// make out folder manually using name of apk // make out folder manually using name of apk
String outName = apkName; String outName = apkName;
@ -167,9 +166,9 @@ public class Main {
// make file from path // make file from path
outName = new File(outName).getName(); outName = new File(outName).getName();
outDir = new File(outName); outDir = new File(outName);
decoder.setOutDir(outDir);
} }
decoder.setOutDir(outDir);
decoder.setApkFile(new File(apkName)); decoder.setApkFile(new File(apkName));
try { try {