Changeset 17395 in josm


Ignore:
Timestamp:
2020-12-07T12:40:06+01:00 (4 years ago)
Author:
GerdP
Message:

see #19098: Unable to update plugin after crash of plugin

  • restore and document old behaviour to return null in case of errors in public method loadLocallyAvailablePluginInformation()
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/plugins/PluginHandler.java

    r17392 r17395  
    947947     *
    948948     * @param monitor the progress monitor. Defaults to {@link NullProgressMonitor#INSTANCE} if null.
    949      * @return the list of locally available plugin information
     949     * @return the list of locally available plugin information, null in case of errors
    950950     *
    951951     */
     
    955955        }
    956956        try {
    957             Map<String, PluginInformation> ret = new HashMap<>();
    958957            ReadLocalPluginInformationTask task = new ReadLocalPluginInformationTask(monitor);
    959958            Future<?> future = MainApplication.worker.submit(task);
     
    962961            } catch (ExecutionException e) {
    963962                Logging.error(e);
    964                 return ret;
     963                return null;
    965964            } catch (InterruptedException e) {
    966965                Logging.warn("InterruptedException in " + PluginHandler.class.getSimpleName()
    967966                        + " while loading locally available plugin information");
    968                 return ret;
    969             }
     967                return null;
     968            }
     969            Map<String, PluginInformation> ret = new HashMap<>();
    970970            for (PluginInformation pi: task.getAvailablePlugins()) {
    971971                ret.put(pi.name, pi);
Note: See TracChangeset for help on using the changeset viewer.