Cleanup (universal suppressions in updater classes; typos)

GitOrigin-RevId: 94867a6042d9f25327efd8e6b9ddf7c9be30dc19
This commit is contained in:
Roman Shevchenko
2023-12-06 21:55:39 +01:00
committed by intellij-monorepo-bot
parent a1110ab66e
commit acb3c911cb
5 changed files with 10 additions and 8 deletions

View File

@@ -47,8 +47,9 @@ public final class Bootstrap {
Locale.setDefault(Locale.ENGLISH);
//noinspection SSBasedInspection
Runner.main(runnerArgs.toArray(new String[0]));
@SuppressWarnings({"SSBasedInspection", "RedundantSuppression"})
var array = runnerArgs.toArray(new String[0]);
Runner.main(array);
}
private static boolean isMac() {

View File

@@ -280,7 +280,7 @@ public class Patch {
forEach(actionsToApply, UpdaterUI.message("backing.up.files"), ui, action -> action.backup(toDir, _backupDir));
}
else {
//noinspection SSBasedInspection
@SuppressWarnings({"SSBasedInspection", "RedundantSuppression"})
List<PatchAction> specialActions = actionsToApply.stream().filter(PatchAction::mandatoryBackup).collect(Collectors.toList());
if (!specialActions.isEmpty()) {
backupDir = Utils.getTempFile("partial_backup");

View File

@@ -41,8 +41,9 @@ public final class Runner {
effectiveArgs.add(arg);
}
}
//noinspection SSBasedInspection
_main(effectiveArgs.toArray(new String[0]));
@SuppressWarnings({"SSBasedInspection", "RedundantSuppression"})
var array = effectiveArgs.toArray(new String[0]);
_main(array);
}
catch (Throwable t) {
LOG.log(Level.SEVERE, "internal error", t);

View File

@@ -148,7 +148,7 @@ public class SwingUpdaterUI implements UpdaterUI {
}
@Override
@SuppressWarnings("SSBasedInspection")
@SuppressWarnings({"SSBasedInspection", "RedundantSuppression"})
public Map<String, ValidationResult.Option> askUser(List<ValidationResult> validationResults) throws OperationCancelledException {
boolean canProceed = validationResults.stream().noneMatch(r -> r.options.contains(ValidationResult.Option.NONE));
Map<String, ValidationResult.Option> result = new HashMap<>();

View File

@@ -288,11 +288,11 @@ public final class Utils {
return new BufferedInputStream(zipFile.getInputStream(entry));
}
// always collect files and folders - to avoid cases such as IDEA-152249
// always collect files and folders to avoid cases such as IDEA-152249
public static LinkedHashSet<String> collectRelativePaths(Path root) throws IOException {
LinkedHashSet<String> result = new LinkedHashSet<>();
Files.walkFileTree(root, new SimpleFileVisitor<Path>() {
Files.walkFileTree(root, new SimpleFileVisitor<>() {
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) {
if (dir != root) {