Modify

Ticket #5231 (closed defect: worksforme)

Opened 19 months ago

Last modified 16 months ago

Exception on update data.

Reported by: anonymous Owned by: team
Priority: major Component: Core
Version: latest Keywords:
Cc:

Description

Using any of the update data options throws an exception when the list isEmpty() function is used on a Storage<T> object. It appears to need this instead:

diff --git a/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java b/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
index ea7de03..8f7ec44 100644
--- a/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
+++ b/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmTask.java
@@ -138,7 +138,7 @@ public class DownloadOsmTask extends AbstractDownloadTask {
                 return;
             if (dataSet == null)
                 return; // user canceled download or error occurred
-            if (dataSet.allPrimitives().isEmpty()) {
+            if (dataSet.allPrimitives().size() == 0) {
                 rememberErrorMessage(tr("No data found in this area."));
                 // need to synthesize a download bounds lest the visual indication of downloaded
                 // area doesn't work

Attachments

Change History

comment:1 Changed 19 months ago by anonymous

Actually, this appears to be because of a shadowed variable/method in DataSet.

comment:2 Changed 19 months ago by bastiK

Looking at the code, I don't see why this should be the case. Is there an easy way to trigger that exception and can you provide stack trace?

comment:3 Changed 16 months ago by stoecker

  • Status changed from new to closed
  • Resolution set to worksforme
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.