Index: trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 11323)
+++ trunk/src/org/openstreetmap/josm/gui/io/BasicUploadSettingsPanel.java	(revision 11366)
@@ -131,14 +131,5 @@
     public void setHistoryComboBoxDownFocusTraversalHandler(final Action handler, final HistoryComboBox hcb) {
         hcb.getEditor().addActionListener(handler);
-        hcb.getEditorComponent().addKeyListener(
-                new KeyAdapter() {
-                    @Override
-                    public void keyTyped(KeyEvent e) {
-                        if (e.getKeyCode() == KeyEvent.VK_TAB) {
-                            handler.actionPerformed(new ActionEvent(hcb, 0, "focusDown"));
-                        }
-                    }
-                }
-        );
+        hcb.getEditorComponent().addKeyListener(new HistoryComboBoxKeyAdapter(hcb, handler));
     }
 
@@ -184,4 +175,21 @@
     }
 
+    static final class HistoryComboBoxKeyAdapter extends KeyAdapter {
+        private final HistoryComboBox hcb;
+        private final Action handler;
+
+        HistoryComboBoxKeyAdapter(HistoryComboBox hcb, Action handler) {
+            this.hcb = hcb;
+            this.handler = handler;
+        }
+
+        @Override
+        public void keyTyped(KeyEvent e) {
+            if (e.getKeyCode() == KeyEvent.VK_TAB) {
+                handler.actionPerformed(new ActionEvent(hcb, 0, "focusDown"));
+            }
+        }
+    }
+
     /**
      * Updates the changeset comment model upon changes in the input field.
Index: trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java	(revision 11323)
+++ trunk/src/org/openstreetmap/josm/gui/io/RecentlyOpenedFilesMenu.java	(revision 11366)
@@ -60,18 +60,5 @@
 
         for (final String file : fileHistory) {
-            add(new AbstractAction() {
-                {
-                    putValue(NAME, file);
-                    putValue("help", ht("/Action/OpenRecent"));
-                    putValue("toolbar", Boolean.FALSE);
-                }
-                @Override
-                public void actionPerformed(ActionEvent e) {
-                    File f = new File(file);
-                    OpenFileTask task = new OpenFileTask(Collections.singletonList(f), null);
-                    task.setRecordHistory(true);
-                    Main.worker.submit(task);
-                }
-            });
+            add(new OpenRecentAction(file));
         }
         add(new JSeparator());
@@ -82,4 +69,22 @@
         clearItem.setEnabled(!fileHistory.isEmpty());
         add(clearItem);
+    }
+
+    static final class OpenRecentAction extends AbstractAction {
+        private final String file;
+
+        OpenRecentAction(String file) {
+            this.file = file;
+            putValue(NAME, file);
+            putValue("help", ht("/Action/OpenRecent"));
+            putValue("toolbar", Boolean.FALSE);
+        }
+
+        @Override
+        public void actionPerformed(ActionEvent e) {
+            OpenFileTask task = new OpenFileTask(Collections.singletonList(new File(file)), null);
+            task.setRecordHistory(true);
+            Main.worker.submit(task);
+        }
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 11323)
+++ trunk/src/org/openstreetmap/josm/gui/io/SaveLayersDialog.java	(revision 11366)
@@ -225,8 +225,21 @@
 
     private static class LayerListWarningMessagePanel extends JPanel {
+        static final class LayerCellRenderer implements ListCellRenderer<SaveLayerInfo> {
+            private final DefaultListCellRenderer def = new DefaultListCellRenderer();
+
+            @Override
+            public Component getListCellRendererComponent(JList<? extends SaveLayerInfo> list, SaveLayerInfo info, int index,
+                    boolean isSelected, boolean cellHasFocus) {
+                def.setIcon(info.getLayer().getIcon());
+                def.setText(info.getName());
+                return def;
+            }
+        }
+
         private final JLabel lblMessage = new JLabel();
         private final JList<SaveLayerInfo> lstLayers = new JList<>();
 
         LayerListWarningMessagePanel(String msg, List<SaveLayerInfo> infos) {
+            super(new GridBagLayout());
             build();
             lblMessage.setText(msg);
@@ -235,5 +248,4 @@
 
         protected void build() {
-            setLayout(new GridBagLayout());
             GridBagConstraints gc = new GridBagConstraints();
             gc.gridx = 0;
@@ -244,16 +256,5 @@
             add(lblMessage, gc);
             lblMessage.setHorizontalAlignment(JLabel.LEFT);
-            lstLayers.setCellRenderer(
-                    new ListCellRenderer<SaveLayerInfo>() {
-                        private final DefaultListCellRenderer def = new DefaultListCellRenderer();
-                        @Override
-                        public Component getListCellRendererComponent(JList<? extends SaveLayerInfo> list, SaveLayerInfo info, int index,
-                                boolean isSelected, boolean cellHasFocus) {
-                            def.setIcon(info.getLayer().getIcon());
-                            def.setText(info.getName());
-                            return def;
-                        }
-                    }
-            );
+            lstLayers.setCellRenderer(new LayerCellRenderer());
             gc.gridx = 0;
             gc.gridy = 1;
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 11323)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadDialog.java	(revision 11366)
@@ -55,7 +55,7 @@
 import org.openstreetmap.josm.tools.ImageProvider.ImageSizes;
 import org.openstreetmap.josm.tools.InputMapUtils;
+import org.openstreetmap.josm.tools.MultiLineFlowLayout;
 import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.WindowGeometry;
-import org.openstreetmap.josm.tools.MultiLineFlowLayout;
 
 /**
@@ -135,11 +135,5 @@
 
         // a tabbed pane with configuration panels in the lower half
-        tpConfigPanels = new JTabbedPane() {
-            @Override
-            public Dimension getPreferredSize() {
-                // make sure the tabbed pane never grabs more space than necessary
-                return super.getMinimumSize();
-            }
-        };
+        tpConfigPanels = new CompactTabbedPane();
 
         pnlBasicUploadSettings = new BasicUploadSettingsPanel(changesetCommentModel, changesetSourceModel);
@@ -414,4 +408,12 @@
     }
 
+    static final class CompactTabbedPane extends JTabbedPane {
+        @Override
+        public Dimension getPreferredSize() {
+            // make sure the tabbed pane never grabs more space than necessary
+            return super.getMinimumSize();
+        }
+    }
+
     /**
      * Handles an upload.
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 11323)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadSelectionDialog.java	(revision 11366)
@@ -10,4 +10,5 @@
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
+import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -196,20 +197,21 @@
 
     static class OsmPrimitiveListModel extends AbstractListModel<OsmPrimitive> {
+        static final class OsmPrimitiveComparator implements Comparator<OsmPrimitive>, Serializable {
+            private final DefaultNameFormatter formatter = DefaultNameFormatter.getInstance();
+
+            @Override
+            public int compare(OsmPrimitive o1, OsmPrimitive o2) {
+                int ret = OsmPrimitiveType.from(o1).compareTo(OsmPrimitiveType.from(o2));
+                if (ret != 0)
+                    return ret;
+                return o1.getDisplayName(formatter).compareTo(o1.getDisplayName(formatter));
+            }
+        }
+
         private transient List<OsmPrimitive> data;
 
         protected void sort() {
-            if (data == null)
-                return;
-            data.sort(new Comparator<OsmPrimitive>() {
-                    private DefaultNameFormatter formatter = DefaultNameFormatter.getInstance();
-                    @Override
-                    public int compare(OsmPrimitive o1, OsmPrimitive o2) {
-                        int ret = OsmPrimitiveType.from(o1).compareTo(OsmPrimitiveType.from(o2));
-                        if (ret != 0)
-                            return ret;
-                        return o1.getDisplayName(formatter).compareTo(o1.getDisplayName(formatter));
-                    }
-                }
-            );
+            if (data != null)
+                data.sort(new OsmPrimitiveComparator());
         }
 
