cleanup: remove the unnecessary try-catch block

Parsing errors are already caught inside getBoolean()

IDEA-CR-60006, IDEA-233305

GitOrigin-RevId: 3f9fba106b51328908c6508cf1f1eacf69035d9b
This commit is contained in:
Kirill Likhodedov
2020-03-22 16:37:41 +00:00
committed by intellij-monorepo-bot
parent 66ddd2ee21
commit dab14be03a
@@ -90,7 +90,7 @@ public final class ConfigImportHelper {
try {
Pair<Path, Path> oldConfigDirAndOldIdePath = null;
if (shouldAskForConfig(log)) {
if (shouldAskForConfig()) {
oldConfigDirAndOldIdePath = showDialogAndGetOldConfigPath(guessedOldConfigDirs);
}
else if (customMigrationOption != null) {
@@ -187,14 +187,8 @@ public final class ConfigImportHelper {
return configDir.resolveSibling(configDir.getFileName().toString() + "-backup");
}
private static boolean shouldAskForConfig(@NotNull Logger log) {
try {
return Boolean.getBoolean(SHOW_IMPORT_CONFIG_DIALOG_PROPERTY);
}
catch (Throwable t) {
log.error(t);
return false;
}
private static boolean shouldAskForConfig() {
return Boolean.getBoolean(SHOW_IMPORT_CONFIG_DIALOG_PROPERTY);
}
@Nullable