提交 9a4e8bdb 编写于 作者: S Skylot

set default deobfuscation min length to 3 (#332)

上级 fad0091d
......@@ -64,7 +64,7 @@ public class JadxCLIArgs {
protected boolean deobfuscationOn = false;
@Parameter(names = {"--deobf-min"}, description = "min length of name, renamed if shorter")
protected int deobfuscationMinLength = 4;
protected int deobfuscationMinLength = 3;
@Parameter(names = {"--deobf-max"}, description = "max length of name, renamed if longer")
protected int deobfuscationMaxLength = 64;
......
......@@ -24,7 +24,7 @@ public class JadxSettings extends JadxCLIArgs {
private static final String USER_HOME = System.getProperty("user.home");
private static final int RECENT_FILES_COUNT = 15;
private static final int CURRENT_SETTINGS_VERSION = 2;
private static final int CURRENT_SETTINGS_VERSION = 3;
private static final Font DEFAULT_FONT = FONT_HACK != null ? FONT_HACK : new RSyntaxTextArea().getFont();
......@@ -236,7 +236,7 @@ public class JadxSettings extends JadxCLIArgs {
private void upgradeSettings(int fromVersion) {
LOG.debug("upgrade settings from version: {} to {}", fromVersion, CURRENT_SETTINGS_VERSION);
if (fromVersion == 0) {
setDeobfuscationMinLength(4);
setDeobfuscationMinLength(3);
setDeobfuscationUseSourceNameAsAlias(true);
setDeobfuscationForceSave(true);
setThreadsCount(1);
......@@ -247,6 +247,12 @@ public class JadxSettings extends JadxCLIArgs {
}
if (fromVersion == 1) {
setEditorThemePath(CodeArea.getAllThemes()[0].getPath());
fromVersion++;
}
if (fromVersion == 2) {
if (getDeobfuscationMinLength() == 4) {
setDeobfuscationMinLength(3);
}
}
settingsVersion = CURRENT_SETTINGS_VERSION;
sync();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册