void () { final int[] rows = myPackagesTable.getSelectedRows(); if (myPackageManagementService != null) { final Set<String> upgradedPackages = new HashSet<>(); final Set<String> packagesShouldBePostponed = getPackagesToPostpone(); for (int row : rows) { final Object packageObj = myPackagesTableModel.getValueAt(row, 0); if (packageObj instanceof InstalledPackage pkg) { final String packageName = pkg.getName(); final String currentVersion = pkg.getVersion(); final String availableVersion = (String)myPackagesTableModel.getValueAt(row, 2); if (packagesShouldBePostponed.contains(packageName)) { myWaitingToUpgrade.put(pkg, availableVersion); } else if (isUpdateAvailable(currentVersion, availableVersion)) { upgradePackage(pkg, availableVersion); upgradedPackages.add(packageName); } } } if (myCurrentlyInstalling.isEmpty() && upgradedPackages.isEmpty() && !myWaitingToUpgrade.isEmpty()) { upgradePostponedPackages(); } } }