Index: applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java
===================================================================
--- applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java	(revision 18962)
+++ applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java	(revision 19045)
@@ -92,8 +92,8 @@
         public void actionPerformed(ActionEvent e) {
             selectedNode = null;
-            Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelectedNodes();
+            Collection<Node> selection = Main.main.getCurrentDataSet().getSelectedNodes();
             if (selection.size()==0) {
-                selection = Main.main.getCurrentDataSet().getSelectedWays();
-                if (!workFromWaySelection(selection)) {
+                Collection<Way> selWays = Main.main.getCurrentDataSet().getSelectedWays();
+                if (!workFromWaySelection(selWays)) {
                     showWarningMessage(tr("<html>Neither a node nor a way with an endpoint outside of the<br>current download areas is selected.<br>Select a node on the start or end of a way or an entire way first.</html>"));
                     return;
@@ -302,5 +302,5 @@
      * return true if this worked
      */
-    private boolean workFromWaySelection(Collection<OsmPrimitive> selection) {
+    private boolean workFromWaySelection(Collection<? extends OsmPrimitive> selection) {
         if (selection.size() != 1)
             return false;
