Index: /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11086)
+++ /trunk/src/org/openstreetmap/josm/data/osm/visitor/paint/StyledMapRenderer.java	(revision 11087)
@@ -1853,11 +1853,5 @@
             try {
                 for (final OsmPrimitive osm : input) {
-                    try {
-                        if (osm.isDrawable()) {
-                            osm.accept(this);
-                        }
-                    } catch (RuntimeException e) {
-                        throw BugReport.intercept(e).put("osm", osm);
-                    }
+                    acceptDrawable(osm);
                 }
                 return output;
@@ -1866,4 +1860,14 @@
             } finally {
                 MapCSSStyleSource.STYLE_SOURCE_LOCK.readLock().unlock();
+            }
+        }
+
+        private void acceptDrawable(final OsmPrimitive osm) {
+            try {
+                if (osm.isDrawable()) {
+                    osm.accept(this);
+                }
+            } catch (RuntimeException e) {
+                throw BugReport.intercept(e).put("osm", osm);
             }
         }
@@ -1966,9 +1970,5 @@
 
             for (StyleRecord record : allStyleElems) {
-                try {
-                    record.paintPrimitive(paintSettings, this);
-                } catch (RuntimeException e) {
-                    throw BugReport.intercept(e).put("record", record);
-                }
+                paintRecord(record);
             }
 
@@ -1987,3 +1987,11 @@
         }
     }
+
+    private void paintRecord(StyleRecord record) {
+        try {
+            record.paintPrimitive(paintSettings, this);
+        } catch (RuntimeException e) {
+            throw BugReport.intercept(e).put("record", record);
+        }
+    }
 }
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 11086)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MapCSSTagChecker.java	(revision 11087)
@@ -311,6 +311,5 @@
                         if (ai.key.startsWith("throw")) {
                             try {
-                                final Severity severity = Severity.valueOf(ai.key.substring("throw".length()).toUpperCase(Locale.ENGLISH));
-                                check.errors.put(ai, severity);
+                                check.errors.put(ai, Severity.valueOf(ai.key.substring("throw".length()).toUpperCase(Locale.ENGLISH)));
                             } catch (IllegalArgumentException e) {
                                 Main.warn(e, "Unsupported "+ai.key+" instruction. Allowed instructions are "+POSSIBLE_THROWS+'.');
@@ -753,9 +752,5 @@
                 addMapCSS(i);
                 if (Main.pref.getBoolean("validator.auto_reload_local_rules", true) && source.isLocal()) {
-                    try {
-                        Main.fileWatcher.registerValidatorRule(source);
-                    } catch (IOException e) {
-                        Main.error(e);
-                    }
+                    Main.fileWatcher.registerValidatorRule(source);
                 }
             } catch (IOException ex) {
Index: /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 11086)
+++ /trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java	(revision 11087)
@@ -1163,45 +1163,47 @@
                 }
 
-                Main.worker.execute(() -> {
-                    try {
-                        // find a page that actually exists in the wiki
-                        HttpClient.Response conn;
-                        for (URI u : uris) {
-                            conn = HttpClient.create(u.toURL(), "HEAD").connect();
-
-                            if (conn.getResponseCode() != 200) {
-                                conn.disconnect();
-                            } else {
-                                long osize = conn.getContentLength();
-                                if (osize > -1) {
-                                    conn.disconnect();
-
-                                    final URI newURI = new URI(u.toString()
-                                            .replace("=", "%3D") /* do not URLencode whole string! */
-                                            .replaceFirst("/wiki/", "/w/index.php?redirect=no&title=")
-                                    );
-                                    conn = HttpClient.create(newURI.toURL(), "HEAD").connect();
-                                }
-
-                                /* redirect pages have different content length, but retrieving a "nonredirect"
-                                 *  page using index.php and the direct-link method gives slightly different
-                                 *  content lengths, so we have to be fuzzy.. (this is UGLY, recode if u know better)
-                                 */
-                                if (conn.getContentLength() != -1 && osize > -1 && Math.abs(conn.getContentLength() - osize) > 200) {
-                                    Main.info("{0} is a mediawiki redirect", u);
-                                    conn.disconnect();
-                                } else {
-                                    conn.disconnect();
-
-                                    OpenBrowser.displayUrl(u.toString());
-                                    break;
-                                }
-                            }
+                Main.worker.execute(() -> displayHelp(uris));
+            } catch (URISyntaxException e1) {
+                Main.error(e1);
+            }
+        }
+
+        private void displayHelp(final List<URI> uris) {
+            try {
+                // find a page that actually exists in the wiki
+                HttpClient.Response conn;
+                for (URI u : uris) {
+                    conn = HttpClient.create(u.toURL(), "HEAD").connect();
+
+                    if (conn.getResponseCode() != 200) {
+                        conn.disconnect();
+                    } else {
+                        long osize = conn.getContentLength();
+                        if (osize > -1) {
+                            conn.disconnect();
+
+                            final URI newURI = new URI(u.toString()
+                                    .replace("=", "%3D") /* do not URLencode whole string! */
+                                    .replaceFirst("/wiki/", "/w/index.php?redirect=no&title=")
+                            );
+                            conn = HttpClient.create(newURI.toURL(), "HEAD").connect();
                         }
-                    } catch (URISyntaxException | IOException e1) {
-                        Main.error(e1);
+
+                        /* redirect pages have different content length, but retrieving a "nonredirect"
+                         *  page using index.php and the direct-link method gives slightly different
+                         *  content lengths, so we have to be fuzzy.. (this is UGLY, recode if u know better)
+                         */
+                        if (conn.getContentLength() != -1 && osize > -1 && Math.abs(conn.getContentLength() - osize) > 200) {
+                            Main.info("{0} is a mediawiki redirect", u);
+                            conn.disconnect();
+                        } else {
+                            conn.disconnect();
+
+                            OpenBrowser.displayUrl(u.toString());
+                            break;
+                        }
                     }
-                });
-            } catch (URISyntaxException e1) {
+                }
+            } catch (URISyntaxException | IOException e1) {
                 Main.error(e1);
             }
Index: /trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 11086)
+++ /trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java	(revision 11087)
@@ -171,17 +171,5 @@
                     break;
                 }
-                String msg = getLoadingMessage(pid);
-                progressMonitor.indeterminateSubTask(tr(msg, Long.toString(pid.getUniqueId())));
-                reader = null;
-                HistoryDataSet ds;
-                try {
-                    reader = new OsmServerHistoryReader(pid.getType(), pid.getUniqueId());
-                    ds = loadHistory(reader, progressMonitor);
-                } catch (OsmTransferException e) {
-                    if (canceled)
-                        return;
-                    throw e;
-                }
-                loadedData.mergeInto(ds);
+                loadHistory(pid);
             }
         } catch (OsmTransferException e) {
@@ -189,4 +177,20 @@
             return;
         }
+    }
+
+    private void loadHistory(PrimitiveId pid) throws OsmTransferException {
+        String msg = getLoadingMessage(pid);
+        progressMonitor.indeterminateSubTask(tr(msg, Long.toString(pid.getUniqueId())));
+        reader = null;
+        HistoryDataSet ds;
+        try {
+            reader = new OsmServerHistoryReader(pid.getType(), pid.getUniqueId());
+            ds = loadHistory(reader, progressMonitor);
+        } catch (OsmTransferException e) {
+            if (canceled)
+                return;
+            throw e;
+        }
+        loadedData.mergeInto(ds);
     }
 
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 11086)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java	(revision 11087)
@@ -588,16 +588,5 @@
                     for (PreferenceSetting setting : settings) {
                         if (setting instanceof SubPreferenceSetting) {
-                            SubPreferenceSetting sps = (SubPreferenceSetting) setting;
-                            if (sps.getTabPreferenceSetting(this) == preferenceSettings) {
-                                try {
-                                    sps.addGui(this);
-                                } catch (SecurityException ex) {
-                                    Main.error(ex);
-                                } catch (RuntimeException ex) {
-                                    BugReportExceptionHandler.handleException(ex);
-                                } finally {
-                                    settingsInitialized.add(sps);
-                                }
-                            }
+                            addSubPreferenceSetting(preferenceSettings, (SubPreferenceSetting) setting);
                         }
                     }
@@ -618,3 +607,17 @@
         }
     }
+
+    private void addSubPreferenceSetting(TabPreferenceSetting preferenceSettings, SubPreferenceSetting sps) {
+        if (sps.getTabPreferenceSetting(this) == preferenceSettings) {
+            try {
+                sps.addGui(this);
+            } catch (SecurityException ex) {
+                Main.error(ex);
+            } catch (RuntimeException ex) {
+                BugReportExceptionHandler.handleException(ex);
+            } finally {
+                settingsInitialized.add(sps);
+            }
+        }
+    }
 }
