mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-40093 - NPE: UpdateChecker.install
This commit is contained in:
@@ -105,7 +105,7 @@ public class InstalledPluginsTableModel extends PluginTableModel {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void updateExistingPlugin(IdeaPluginDescriptor descriptor, IdeaPluginDescriptor existing) {
|
||||
public static void updateExistingPlugin(IdeaPluginDescriptor descriptor, @Nullable IdeaPluginDescriptor existing) {
|
||||
if (existing != null) {
|
||||
updateExistingPluginInfo(descriptor, existing);
|
||||
updatedPlugins.add(existing.getPluginId());
|
||||
|
||||
+10
-8
@@ -601,14 +601,16 @@ public final class UpdateChecker {
|
||||
boolean installed = false;
|
||||
for (PluginDownloader downloader : downloaders) {
|
||||
if (getDisabledToUpdatePlugins().contains(downloader.getPluginId())) continue;
|
||||
try {
|
||||
final IdeaPluginDescriptor descriptor = downloader.getDescriptor();
|
||||
InstalledPluginsTableModel.updateExistingPlugin(descriptor, PluginManager.getPlugin(descriptor.getPluginId()));
|
||||
downloader.install();
|
||||
installed = true;
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.info(e);
|
||||
final IdeaPluginDescriptor descriptor = downloader.getDescriptor();
|
||||
if (descriptor != null) {
|
||||
try {
|
||||
InstalledPluginsTableModel.updateExistingPlugin(descriptor, PluginManager.getPlugin(descriptor.getPluginId()));
|
||||
downloader.install();
|
||||
installed = true;
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOG.info(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
return installed;
|
||||
|
||||
Reference in New Issue
Block a user