Ignore:
Timestamp:
2016-11-19T14:43:38+01:00 (7 years ago)
Author:
michael2402
Message:

Fix #14008: Do not break loop.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/OpenLocationAction.java

    r11279 r11286  
    199199     * Open the given URL. This class checks the {@link #USE_NEW_LAYER} preference to check if a new layer should be used.
    200200     * @param url The URL to open
    201      * @return <code>true</code> if loading the task was started successfully.
     201     * @return <code>true</code> if at least one task was started successfully.
     202     * @since 11279
    202203     */
    203204    public boolean openUrl(String url) {
     
    217218        PleaseWaitProgressMonitor monitor = new PleaseWaitProgressMonitor(tr("Download Data"));
    218219
     220        boolean hadAnySuccess = false;
    219221        for (final DownloadTask task : tasks) {
    220222            try {
    221223                Future<?> future = task.loadUrl(newLayer, url, monitor);
    222224                Main.worker.submit(new PostDownloadHandler(task, future));
    223                 return true;
     225                hadAnySuccess = true;
    224226            } catch (IllegalArgumentException e) {
    225227                Main.error(e);
    226228            }
    227229        }
    228         return false;
     230        return hadAnySuccess;
    229231    }
    230232
Note: See TracChangeset for help on using the changeset viewer.