Modify

Opened 15 years ago

Closed 15 years ago

#5231 closed defect (worksforme)

Exception on update data.

Reported by: anonymous Owned by: team
Priority: major Milestone:
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 (0)

Change History (3)

comment:1 by anonymous, 15 years ago

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

comment:2 by bastiK, 15 years ago

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 by stoecker, 15 years ago

Resolution: worksforme
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.