Index: trunk/src/org/openstreetmap/josm/Main.java
===================================================================
--- trunk/src/org/openstreetmap/josm/Main.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/Main.java	(revision 6783)
@@ -373,7 +373,7 @@
      */
     public static String getErrorMessage(Throwable t) {
-    	if (t == null) {
-    		return null;
-    	}
+        if (t == null) {
+            return null;
+        }
         StringBuilder sb = new StringBuilder(t.getClass().getName());
         String msg = t.getMessage();
Index: trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java
===================================================================
--- trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/actions/AutoScaleAction.java	(revision 6783)
@@ -173,12 +173,4 @@
     }
 
-    protected Layer getActiveLayer() {
-        try {
-            return Main.map.mapView.getActiveLayer();
-        } catch(NullPointerException e) {
-            return null;
-        }
-    }
-
     /**
      * Replies the first selected layer in the layer list dialog. null, if no
@@ -208,5 +200,5 @@
             }
         } else if (mode.equals("layer")) {
-            if (getActiveLayer() == null)
+            if (Main.main.getActiveLayer() == null)
                 return null;
             // try to zoom to the first selected layer
Index: trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java
===================================================================
--- trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java	(revision 6783)
@@ -285,7 +285,8 @@
 
     private static void addPresetValue(TaggingPreset p, KeyedItem ky) {
-        if (ky.key != null && ky.getValues() != null) {
+        Collection<String> values = ky.getValues();
+        if (ky.key != null && values != null) {
             try {
-                presetsValueData.putAll(ky.key, ky.getValues());
+                presetsValueData.putAll(ky.key, values);
             } catch (NullPointerException e) {
                 Main.error(p+": Unable to initialize "+ky);
Index: trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java	(revision 6783)
@@ -31,5 +31,4 @@
 import javax.swing.UIManager;
 
-import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.gui.help.HelpBrowser;
 import org.openstreetmap.josm.gui.help.HelpUtil;
@@ -431,10 +430,6 @@
         Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
         Dimension x = new Dimension(screenSize.width*2/3, screenSize.height*2/3);
-        try {
-            if(parent != null) {
-                x = JOptionPane.getFrameForComponent(parent).getSize();
-            }
-        } catch(NullPointerException e) {
-            Main.warn(e);
+        if (parent != null) {
+            x = JOptionPane.getFrameForComponent(parent).getSize();
         }
         return x;
Index: trunk/src/org/openstreetmap/josm/gui/MapStatus.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/MapStatus.java	(revision 6783)
@@ -283,5 +283,4 @@
                                     }
 
-
                                     // Popup Information
                                     // display them if the middle mouse button is pressed and
@@ -328,6 +327,4 @@
                                     oldMousePos = ms.mousePos;
                                 } catch (ConcurrentModificationException x) {
-                                    Main.warn(x);
-                                } catch (NullPointerException x) {
                                     Main.warn(x);
                                 } finally {
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/LayerListDialog.java	(revision 6783)
@@ -109,7 +109,4 @@
     private LayerListModel model;
 
-    /** the selection model */
-    private DefaultListSelectionModel selectionModel;
-
     /** the list of layers (technically its a JTable, but appears like a list) */
     private LayerList layerList;
@@ -165,5 +162,5 @@
         // create the models
         //
-        selectionModel = new DefaultListSelectionModel();
+        DefaultListSelectionModel selectionModel = new DefaultListSelectionModel();
         selectionModel.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
         model = new LayerListModel(selectionModel);
Index: trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/help/HelpUtil.java	(revision 6783)
@@ -27,5 +27,5 @@
      * @return the base wiki URL
      */
-    static public String getWikiBaseUrl() {
+    public static String getWikiBaseUrl() {
         return Main.pref.get("help.baseurl", Main.JOSM_WEBSITE);
     }
@@ -36,5 +36,5 @@
      * @return the base wiki URL for help pages
      */
-    static public String getWikiBaseHelpUrl() {
+    public static String getWikiBaseHelpUrl() {
         return getWikiBaseUrl() + "/wiki";
     }
@@ -47,5 +47,5 @@
      * @see #buildAbsoluteHelpTopic
      */
-    static public String getHelpTopicUrl(String absoluteHelpTopic) {
+    public static String getHelpTopicUrl(String absoluteHelpTopic) {
         if(absoluteHelpTopic == null)
             return null;
@@ -63,5 +63,5 @@
      * @return the URL to the edit page
      */
-    static public String getHelpTopicEditUrl(String absoluteHelpTopic) {
+    public static String getHelpTopicEditUrl(String absoluteHelpTopic) {
         String topicUrl = getHelpTopicUrl(absoluteHelpTopic);
         topicUrl = topicUrl.replaceAll("#[^#]*$", ""); // remove optional fragment
@@ -76,5 +76,5 @@
      * @return the relative help topic in the URL, i.e. "/Action/New"
      */
-    static public String extractRelativeHelpTopic(String url) {
+    public static String extractRelativeHelpTopic(String url) {
         String topic = extractAbsoluteHelpTopic(url);
         if (topic == null)
@@ -94,5 +94,5 @@
      * @return the absolute help topic in the URL, i.e. "/De:Help/Action/New"
      */
-    static public String extractAbsoluteHelpTopic(String url) {
+    public static String extractAbsoluteHelpTopic(String url) {
         if (!url.startsWith(getWikiBaseHelpUrl())) return null;
         url = url.substring(getWikiBaseHelpUrl().length());
@@ -119,5 +119,5 @@
      * @since 5915
      */
-    static private String getHelpTopicPrefix(LocaleType type) {
+    private static String getHelpTopicPrefix(LocaleType type) {
         String ret = LanguageInfo.getWikiLanguagePrefix(type);
         if(ret == null)
@@ -138,5 +138,5 @@
      * @since 5915
      */
-    static public String buildAbsoluteHelpTopic(String topic, LocaleType type) {
+    public static String buildAbsoluteHelpTopic(String topic, LocaleType type) {
         String prefix = getHelpTopicPrefix(type);
         if (prefix == null || topic == null || topic.trim().length() == 0 || topic.trim().equals("/"))
@@ -151,5 +151,5 @@
      * @return the help topic. null, if no context specific help topic is found
      */
-    static public String getContextSpecificHelpTopic(Object context) {
+    public static String getContextSpecificHelpTopic(Object context) {
         if (context == null)
             return null;
@@ -183,10 +183,9 @@
      * @return instance of help action
      */
-    static private Action getHelpAction() {
-        try {
+    private static Action getHelpAction() {
+        if (Main.main.menu != null) {
             return Main.main.menu.help;
-        } catch(NullPointerException e) {
-            return new HelpAction();
-        }
+        }
+        return new HelpAction();
     }
 
@@ -201,5 +200,5 @@
      * @param relativeHelpTopic the help topic. Set to the default help topic if null.
      */
-    static public void setHelpContext(JComponent component, String relativeHelpTopic) {
+    public static void setHelpContext(JComponent component, String relativeHelpTopic) {
         if (relativeHelpTopic == null) {
             relativeHelpTopic = "/";
@@ -224,5 +223,5 @@
      * @param helpTopic
      */
-    static public String ht(String helpTopic) {
+    public static String ht(String helpTopic) {
         // this is just a marker method
         return helpTopic;
Index: trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java	(revision 6783)
@@ -196,10 +196,5 @@
                     if (children != null) {
                         progressMonitor.subTask(tr("Scanning directory {0}", f.getPath()));
-                        try {
-                            addRecursiveFiles(files, Arrays.asList(children));
-                        } catch(NullPointerException npe) {
-                            Main.error(npe);
-                            rememberError(tr("Found null file in directory {0}\n", f.getPath()));
-                        }
+                        addRecursiveFiles(files, Arrays.asList(children));
                     } else {
                         rememberError(tr("Error while getting files from directory {0}\n", f.getPath()));
Index: trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/display/LanguagePreference.java	(revision 6783)
@@ -45,10 +45,8 @@
     /** the combo box with the available locales */
     private JosmComboBox langCombo;
-    /** the model for the combo box */
-    private LanguageComboBoxModel model;
 
     @Override
     public void addGui(final PreferenceTabbedPane gui) {
-        model = new LanguageComboBoxModel();
+        LanguageComboBoxModel model = new LanguageComboBoxModel();
         // Selecting the language BEFORE the JComboBox listens to model changes speed up initialization by ~35ms (see #7386)
         // See http://stackoverflow.com/questions/3194958/fast-replacement-for-jcombobox-basiccomboboxui
Index: trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorPanel.java	(revision 6783)
@@ -42,6 +42,4 @@
     private final PresetHandler presetHandler;
 
-    private AutoCompletionManager autocomplete;
-
     /**
      * builds the panel with the table for editing tags
@@ -183,5 +181,5 @@
         CheckParameterUtil.ensureParameterNotNull(layer, "layer");
 
-        autocomplete = layer.data.getAutoCompletionManager();
+        AutoCompletionManager autocomplete = layer.data.getAutoCompletionManager();
         AutoCompletionList acList = new AutoCompletionList();
 
Index: trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 6782)
+++ trunk/src/org/openstreetmap/josm/gui/widgets/MultiSplitLayout.java	(revision 6783)
@@ -245,10 +245,4 @@
     }
 
-    private Dimension minimumComponentSize(Node node) {
-        Component child = childForNode(node);
-        return (child != null) ? child.getMinimumSize() : new Dimension(0, 0);
-
-    }
-
     private Dimension preferredNodeSize(Node root) {
         if (root instanceof Leaf)
