Index: trunk/src/org/openstreetmap/josm/actions/OverpassDownloadAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/OverpassDownloadAction.java	(revision 12574)
+++ trunk/src/org/openstreetmap/josm/actions/OverpassDownloadAction.java	(revision 12575)
@@ -106,5 +106,5 @@
          * want to save the last query in OverpassQueryList.
          */
-        Consumer<Collection> errorReporter = (errors) -> {
+        Consumer<Collection<Object>> errorReporter = errors -> {
 
             boolean onlyNoDataError = errors.size() == 1 &&
@@ -221,5 +221,5 @@
                 @Override
                 public void focusLost(FocusEvent e) {
-
+                    // ignored
                 }
             });
@@ -233,5 +233,5 @@
                 ? BasicArrowButton.EAST
                 : BasicArrowButton.WEST);
-            arrowButton.addActionListener(e ->  {
+            arrowButton.addActionListener(e -> {
                 if (overpassQueryList.isVisible()) {
                     overpassQueryList.setVisible(false);
@@ -288,4 +288,10 @@
     private static final class QueryWizardDialog extends ExtendedDialog {
 
+        private static final String HEADLINE_START = "<h3>";
+        private static final String HEADLINE_END = "</h3>";
+        private static final String TR_START = "<tr>";
+        private static final String TR_END = "</tr>";
+        private static final String TD_START = "<td>";
+        private static final String TD_END = "</td>";
         private static QueryWizardDialog dialog;
         private final HistoryComboBox queryWizard;
@@ -329,5 +335,5 @@
 
             JLabel searchLabel = new JLabel(tr("Search :"));
-            JTextComponent descPane = this.buildDescriptionSection();
+            JTextComponent descPane = buildDescriptionSection();
             JScrollPane scroll = GuiHelper.embedInVerticalScrollPane(descPane);
             scroll.getVerticalScrollBar().setUnitIncrement(10); // make scrolling smooth
@@ -422,6 +428,6 @@
         }
 
-        private JTextComponent buildDescriptionSection() {
-            JEditorPane descriptionSection = new JEditorPane("text/html", this.getDescriptionContent());
+        private static JTextComponent buildDescriptionSection() {
+            JEditorPane descriptionSection = new JEditorPane("text/html", getDescriptionContent());
             descriptionSection.setEditable(false);
             descriptionSection.addHyperlinkListener(e -> {
@@ -434,11 +440,11 @@
         }
 
-        private String getDescriptionContent() {
+        private static String getDescriptionContent() {
             return new StringBuilder("<html>")
                     .append(DESCRIPTION_STYLE)
                     .append("<body>")
-                    .append("<h3>")
+                    .append(HEADLINE_START)
                     .append(tr("Query Wizard"))
-                    .append("</h3>")
+                    .append(HEADLINE_END)
                     .append("<p>")
                     .append(tr("Allows you to interact with <i>Overpass API</i> by writing declarative, human-readable terms."))
@@ -447,16 +453,16 @@
                     .append(tr("<a href=\"{0}\">OSM Wiki</a>.", Main.getOSMWebsite() + "/wiki/Overpass_turbo/Wizard"))
                     .append("</p>")
-                    .append("<h3>").append(tr("Hints")).append("</h3>")
-                    .append("<table>").append("<tr>").append("<td>")
+                    .append(HEADLINE_START).append(tr("Hints")).append(HEADLINE_END)
+                    .append("<table>").append(TR_START).append(TD_START)
                     .append(Utils.joinAsHtmlUnorderedList(Arrays.asList("<i>type:node</i>", "<i>type:relation</i>", "<i>type:way</i>")))
-                    .append("</td>").append("<td>")
+                    .append(TD_END).append(TD_START)
                     .append("<span>").append(tr("Download objects of a certain type.")).append("</span>")
-                    .append("</td>").append("</tr>")
-                    .append("<tr>").append("<td>")
+                    .append(TD_END).append(TR_END)
+                    .append(TR_START).append(TD_START)
                     .append(Utils.joinAsHtmlUnorderedList(
                             Arrays.asList("<i>key=value in <u>location</u></i>",
                                     "<i>key=value around <u>location</u></i>",
                                     "<i>key=value in bbox</i>")))
-                    .append("</td>").append("<td>")
+                    .append(TD_END).append(TD_START)
                     .append(tr("Download object by specifying a specific location. For example,"))
                     .append(Utils.joinAsHtmlUnorderedList(Arrays.asList(
@@ -469,22 +475,22 @@
                     .append(tr("Instead of <i>location</i> any valid place name can be used like address, city, etc."))
                     .append("</span>")
-                    .append("</td>").append("</tr>")
-                    .append("<tr>").append("<td>")
+                    .append(TD_END).append(TR_END)
+                    .append(TR_START).append(TD_START)
                     .append(Utils.joinAsHtmlUnorderedList(Arrays.asList("<i>key=value</i>", "<i>key=*</i>", "<i>key~regex</i>",
                             "<i>key!=value</i>", "<i>key!~regex</i>", "<i>key=\"combined value\"</i>")))
-                    .append("</td>").append("<td>")
+                    .append(TD_END).append(TD_START)
                     .append(tr("<span>Download objects that have some concrete key/value pair, only the key with any contents for the value, " +
                             "the value matching some regular expression. 'Not equal' operators are supported as well.</span>"))
-                    .append("</td>").append("</tr>")
-                    .append("<tr>").append("<td>")
+                    .append(TD_END).append(TR_END)
+                    .append(TR_START).append(TD_START)
                     .append(Utils.joinAsHtmlUnorderedList(Arrays.asList(
                             tr("<i>expression1 {0} expression2</i>", "or"),
                             tr("<i>expression1 {0} expression2</i>", "and"))))
-                    .append("</td>").append("<td>")
+                    .append(TD_END).append(TD_START)
                     .append("<span>")
                     .append(tr("Basic logical operators can be used to create more sophisticated queries. Instead of 'or' - '|', '||' " +
                             "can be used, and instead of 'and' - '&', '&&'."))
                     .append("</span>")
-                    .append("</td>").append("</tr>").append("</table>")
+                    .append(TD_END).append(TR_END).append("</table>")
                     .append("</body>")
                     .append("</html>")
Index: trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 12574)
+++ trunk/src/org/openstreetmap/josm/actions/downloadtasks/PostDownloadHandler.java	(revision 12575)
@@ -30,8 +30,8 @@
     private final DownloadTask task;
     private final Future<?> future;
-    private Consumer<Collection> errorReporter;
+    private Consumer<Collection<Object>> errorReporter;
 
     /**
-     * constructor
+     * Creates a new {@link PostDownloadHandler}
      * @param task the asynchronous download task
      * @param future the future on which the completion of the download task can be synchronized
@@ -43,5 +43,5 @@
 
     /**
-     * constructor
+     * Creates a new {@link PostDownloadHandler} using a custom error reporter
      * @param task the asynchronous download task
      * @param future the future on which the completion of the download task can be synchronized
@@ -49,5 +49,5 @@
      *                      task
      */
-    public PostDownloadHandler(DownloadTask task, Future<?> future, Consumer<Collection> errorReporter) {
+    public PostDownloadHandler(DownloadTask task, Future<?> future, Consumer<Collection<Object>> errorReporter) {
         this(task, future);
         this.errorReporter = errorReporter;
Index: trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 12574)
+++ trunk/src/org/openstreetmap/josm/gui/download/DownloadDialog.java	(revision 12575)
Index: trunk/src/org/openstreetmap/josm/gui/download/OverpassQueryList.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/download/OverpassQueryList.java	(revision 12574)
+++ trunk/src/org/openstreetmap/josm/gui/download/OverpassQueryList.java	(revision 12575)
@@ -56,5 +56,5 @@
 public final class OverpassQueryList extends SearchTextResultListPanel<OverpassQueryList.SelectorItem> {
 
-    private final DateTimeFormatter format = DateTimeFormatter.ofPattern("HH:mm:ss, dd-MM-yyyy");
+    private static final DateTimeFormatter FORMAT = DateTimeFormatter.ofPattern("HH:mm:ss, dd-MM-yyyy");
 
     /*
@@ -85,5 +85,5 @@
         this.target = target;
         this.componentParent = parent;
-        this.items = this.restorePreferences();
+        this.items = restorePreferences();
 
         OverpassQueryListMouseAdapter mouseHandler = new OverpassQueryListMouseAdapter(lsResult, lsResultModel);
@@ -134,5 +134,5 @@
         if (!historicExist) {
             SelectorItem item = new SelectorItem(
-                    "history " + LocalDateTime.now().format(this.format),
+                    "history " + LocalDateTime.now().format(FORMAT),
                     query);
 
@@ -261,5 +261,5 @@
      * @return A set of the user saved items.
      */
-    private Map<String, SelectorItem> restorePreferences() {
+    private static Map<String, SelectorItem> restorePreferences() {
         Collection<Map<String, String>> toRetrieve =
                 Main.pref.getListOfStructs(PREFERENCE_ITEMS, Collections.emptyList());
@@ -279,11 +279,10 @@
     private class OverpassQueryListMouseAdapter extends MouseAdapter {
 
-        private final JList list;
-        private final ResultListModel model;
+        private final JList<SelectorItem> list;
+        private final ResultListModel<SelectorItem> model;
         private final JPopupMenu emptySelectionPopup = new JPopupMenu();
         private final JPopupMenu elementPopup = new JPopupMenu();
-        private final JPopupMenu queryLookup = new JPopupMenu();
-
-        OverpassQueryListMouseAdapter(JList list, ResultListModel listModel) {
+
+        OverpassQueryListMouseAdapter(JList<SelectorItem> list, ResultListModel<SelectorItem> listModel) {
             this.list = list;
             this.model = listModel;
@@ -331,5 +330,5 @@
             }
 
-            SelectorItem item = (SelectorItem) model.getElementAt(idx);
+            SelectorItem item = model.getElementAt(idx);
             list.setToolTipText("<html><pre style='width:300px;'>" +
                     Utils.escapeReservedCharactersHTML(Utils.restrictStringLines(item.getQuery(), 9)));
@@ -607,17 +606,39 @@
 
         @Override
-        public boolean equals(Object o) {
-            if (this == o) return true;
-            if (!(o instanceof SelectorItem)) return false;
-
-            SelectorItem that = (SelectorItem) o;
-
-            return itemKey.equals(that.itemKey) &&
-                    query.equals(that.getKey());
+        public int hashCode() {
+            final int prime = 31;
+            int result = 1;
+            result = prime * result + ((itemKey == null) ? 0 : itemKey.hashCode());
+            result = prime * result + ((query == null) ? 0 : query.hashCode());
+            return result;
         }
 
         @Override
-        public int hashCode() {
-            return itemKey.hashCode();
+        public boolean equals(Object obj) {
+            if (this == obj) {
+                return true;
+            }
+            if (obj == null) {
+                return false;
+            }
+            if (getClass() != obj.getClass()) {
+                return false;
+            }
+            SelectorItem other = (SelectorItem) obj;
+            if (itemKey == null) {
+                if (other.itemKey != null) {
+                    return false;
+                }
+            } else if (!itemKey.equals(other.itemKey)) {
+                return false;
+            }
+            if (query == null) {
+                if (other.query != null) {
+                    return false;
+                }
+            } else if (!query.equals(other.query)) {
+                return false;
+            }
+            return true;
         }
     }
