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 , 15 years ago
comment:2 by , 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 , 15 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.



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