Index: /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/cache/JCSCacheManager.java	(revision 10235)
@@ -158,5 +158,6 @@
 
     @SuppressWarnings("unchecked")
-    private static <K, V> CacheAccess<K, V> getCacheInner(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath) {
+    private static <K, V> CacheAccess<K, V> getCacheInner(String cacheName, int maxMemoryObjects, int maxDiskObjects, String cachePath)
+            throws IOException {
         CompositeCache<K, V> cc = cacheManager.getCache(cacheName, getCacheAttributes(maxMemoryObjects));
 
@@ -169,6 +170,8 @@
                     cc.setAuxCaches(new AuxiliaryCache[]{diskCache});
                 }
+            } catch (IOException e) {
+                throw e;
             } catch (Exception e) {
-                throw new RuntimeException(e);
+                throw new IOException(e);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/data/imagery/CachedTileLoaderFactory.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/imagery/CachedTileLoaderFactory.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/imagery/CachedTileLoaderFactory.java	(revision 10235)
@@ -4,5 +4,4 @@
 import java.io.File;
 import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
@@ -33,5 +32,5 @@
      * @param cache cache instance which will be used by tile loaders created by this tile loader
      * @param tileLoaderClass tile loader class that will be created
-     *
+     * @throws IllegalArgumentException if a suitable constructor cannot be found for {@code tileLoaderClass}
      */
     public CachedTileLoaderFactory(ICacheAccess<String, BufferedImageCacheEntry> cache, Class<? extends TileLoader> tileLoaderClass) {
@@ -46,5 +45,5 @@
         } catch (NoSuchMethodException | SecurityException e) {
             Main.warn(e);
-            throw new RuntimeException(e);
+            throw new IllegalArgumentException(e);
         }
     }
@@ -88,7 +87,10 @@
                     readTimeout,
                     headers);
-        } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+        } catch (IllegalArgumentException e) {
             Main.warn(e);
-            throw new RuntimeException(e);
+            throw e;
+        } catch (ReflectiveOperationException e) {
+            Main.warn(e);
+            throw new IllegalArgumentException(e);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/data/preferences/ListListSetting.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/preferences/ListListSetting.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/preferences/ListListSetting.java	(revision 10235)
@@ -74,8 +74,8 @@
         if (value != null) {
             if (value.contains(null))
-                throw new RuntimeException("Error: Null as list element in preference setting");
+                throw new IllegalArgumentException("Error: Null as list element in preference setting");
             for (Collection<String> lst : value) {
                 if (lst.contains(null)) {
-                    throw new RuntimeException("Error: Null as inner list element in preference setting");
+                    throw new IllegalArgumentException("Error: Null as inner list element in preference setting");
                 }
             }
Index: /trunk/src/org/openstreetmap/josm/data/preferences/ListSetting.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/preferences/ListSetting.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/preferences/ListSetting.java	(revision 10235)
@@ -44,5 +44,5 @@
     private void consistencyTest() {
         if (value != null && value.contains(null))
-            throw new RuntimeException("Error: Null as list element in preference setting");
+            throw new IllegalArgumentException("Error: Null as list element in preference setting");
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/preferences/MapListSetting.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/preferences/MapListSetting.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/preferences/MapListSetting.java	(revision 10235)
@@ -73,10 +73,10 @@
             return;
         if (value.contains(null))
-            throw new RuntimeException("Error: Null as list element in preference setting");
+            throw new IllegalArgumentException("Error: Null as list element in preference setting");
         for (Map<String, String> map : value) {
             if (map.keySet().contains(null))
-                throw new RuntimeException("Error: Null as map key in preference setting");
+                throw new IllegalArgumentException("Error: Null as map key in preference setting");
             if (map.values().contains(null))
-                throw new RuntimeException("Error: Null as map value in preference setting");
+                throw new IllegalArgumentException("Error: Null as map value in preference setting");
         }
     }
Index: /trunk/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java	(revision 10235)
@@ -31,4 +31,5 @@
 import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.io.CachedFile;
+import org.openstreetmap.josm.io.XmlStreamParsingException;
 import org.xml.sax.SAXException;
 
@@ -37,6 +38,4 @@
  */
 public class PreferencesReader {
-
-    private static final String XSI_NS = "http://www.w3.org/2001/XMLSchema-instance";
 
     private final SortedMap<String, Setting<?>> settings = new TreeMap<>();
@@ -118,4 +117,9 @@
     }
 
+    /**
+     * Parse preferences.
+     * @throws XMLStreamException if any XML parsing error occurs
+     * @throws IOException if any I/O error occurs
+     */
     public void parse() throws XMLStreamException, IOException {
         if (reader != null) {
@@ -168,5 +172,5 @@
                 switch(localName) {
                 case "tag":
-                    Setting setting;
+                    StringSetting setting;
                     if (defaults && isNil()) {
                         setting = new StringSetting(null);
@@ -221,5 +225,5 @@
         List<Map<String, String>> maps = null;
         if (defaults && isNil()) {
-            Setting setting;
+            Setting<?> setting;
             switch (name) {
                 case "lists":
@@ -268,5 +272,5 @@
                 }
             }
-            Setting setting;
+            Setting<?> setting;
             if (entries != null) {
                 setting = new ListSetting(Collections.unmodifiableList(entries));
@@ -337,17 +341,17 @@
      */
     private boolean isNil() {
-        String nil = parser.getAttributeValue(XSI_NS, "nil");
+        String nil = parser.getAttributeValue(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "nil");
         return "true".equals(nil) || "1".equals(nil);
     }
 
     /**
-     * Throw RuntimeException with line and column number.
+     * Throw XmlStreamParsingException with line and column number.
      *
      * Only use this for errors that should not be possible after schema validation.
      * @param msg the error message
-     */
-    private void throwException(String msg) {
-        throw new RuntimeException(msg + tr(" (at line {0}, column {1})",
-                parser.getLocation().getLineNumber(), parser.getLocation().getColumnNumber()));
+     * @throws XmlStreamParsingException always
+     */
+    private void throwException(String msg) throws XmlStreamParsingException {
+        throw new XmlStreamParsingException(msg, parser.getLocation());
     }
 }
Index: /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/projection/CustomProjection.java	(revision 10235)
@@ -775,5 +775,5 @@
             ret.put("oslo", parseAngle("10d43'22.5\"E", null));
         } catch (ProjectionConfigurationException ex) {
-            throw new RuntimeException();
+            throw new IllegalStateException(ex);
         }
         return ret;
Index: /trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/projection/proj/AbstractProj.java	(revision 10235)
@@ -138,5 +138,5 @@
         for (i = MAXIMUM_ITERATIONS; true;) { // rarely goes over 5 iterations
             if (--i < 0) {
-                throw new RuntimeException("Too many iterations");
+                throw new IllegalStateException("Too many iterations");
             }
             s = Math.sin(phi);
@@ -162,5 +162,5 @@
             }
         }
-        throw new RuntimeException("no convergence");
+        throw new IllegalStateException("no convergence for ts="+ts);
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/projection/proj/AlbersEqualArea.java	(revision 10235)
@@ -126,5 +126,5 @@
                 rho = 0.0;
             } else {
-                throw new RuntimeException();
+                throw new AssertionError();
             }
         }
@@ -184,5 +184,5 @@
             }
         }
-        throw new RuntimeException("no convergence for q="+qs);
+        throw new IllegalStateException("no convergence for qs="+qs);
     }
 
Index: /trunk/src/org/openstreetmap/josm/data/projection/proj/DoubleStereographic.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/proj/DoubleStereographic.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/projection/proj/DoubleStereographic.java	(revision 10235)
@@ -100,5 +100,5 @@
         while (abs(phi - phiprev) > EPSILON) {
             if (++iteration > 10)
-                throw new RuntimeException("Too many iterations");
+                throw new IllegalStateException("Too many iterations");
             phiprev = phi;
             double psii = log(tan(phi/2 + PI/4) * pow((1 - e * sin(phi)) / (1 + e * sin(phi)), e/2));
Index: /trunk/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/data/projection/proj/PolarStereographic.java	(revision 10235)
@@ -163,5 +163,5 @@
             phi0 = phi;
             if (--i < 0) {
-                throw new RuntimeException("no convergence");
+                throw new IllegalStateException("no convergence for x="+x+", y="+y);
             }
         }
Index: /trunk/src/org/openstreetmap/josm/gui/MainApplication.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/gui/MainApplication.java	(revision 10235)
@@ -22,4 +22,5 @@
 import java.security.AllPermission;
 import java.security.CodeSource;
+import java.security.GeneralSecurityException;
 import java.security.KeyStoreException;
 import java.security.NoSuchAlgorithmException;
@@ -413,5 +414,5 @@
         try {
             CertificateAmendment.addMissingCertificates();
-        } catch (IOException ex) {
+        } catch (IOException | GeneralSecurityException ex) {
             ex.printStackTrace();
             Main.warn(getErrorMessage(Utils.getRootCause(ex)));
Index: /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/gui/preferences/SourceEditor.java	(revision 10235)
@@ -498,13 +498,12 @@
      * Synchronously loads available sources and returns the parsed list.
      * @return list of available sources
+     * @throws OsmTransferException in case of OSM transfer error
+     * @throws IOException in case of any I/O error
+     * @throws SAXException in case of any SAX error
      */
-    public final Collection<ExtendedSourceEntry> loadAndGetAvailableSources() {
-        try {
-            final SourceLoader loader = new SourceLoader(availableSourcesUrl, sourceProviders);
-            loader.realRun();
-            return loader.sources;
-        } catch (IOException | SAXException | OsmTransferException ex) {
-            throw new RuntimeException(ex);
-        }
+    public final Collection<ExtendedSourceEntry> loadAndGetAvailableSources() throws SAXException, IOException, OsmTransferException {
+        final SourceLoader loader = new SourceLoader(availableSourcesUrl, sourceProviders);
+        loader.realRun();
+        return loader.sources;
     }
 
Index: /trunk/src/org/openstreetmap/josm/io/CertificateAmendment.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/CertificateAmendment.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/io/CertificateAmendment.java	(revision 10235)
@@ -11,11 +11,9 @@
 import java.nio.file.Path;
 import java.nio.file.Paths;
+import java.security.GeneralSecurityException;
 import java.security.InvalidAlgorithmParameterException;
-import java.security.KeyManagementException;
 import java.security.KeyStore;
 import java.security.KeyStoreException;
 import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.cert.CertificateException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.PKIXParameters;
@@ -59,42 +57,27 @@
      * Add missing root certificates to the list of trusted certificates for TLS connections.
      * @throws IOException if an I/O error occurs
+     * @throws GeneralSecurityException if a security error occurs
      */
-    public static void addMissingCertificates() throws IOException {
+    public static void addMissingCertificates() throws IOException, GeneralSecurityException {
         if (!Main.pref.getBoolean("tls.add-missing-certificates", true))
             return;
-        KeyStore keyStore;
-        try {
-            keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
-        } catch (KeyStoreException ex) {
-            throw new IOException(ex);
-        }
+        KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
         Path cacertsPath = Paths.get(System.getProperty("java.home"), "lib", "security", "cacerts");
         try (InputStream is = Files.newInputStream(cacertsPath)) {
             keyStore.load(is, "changeit".toCharArray());
-        } catch (NoSuchAlgorithmException ex) {
-            throw new RuntimeException(ex);
-        } catch (CertificateException ex) {
-            throw new IOException(ex);
         }
 
-        CertificateFactory cf;
-        try {
-            cf = CertificateFactory.getInstance("X.509");
-        } catch (CertificateException ex) {
-            throw new RuntimeException(ex);
-        }
+        CertificateFactory cf = CertificateFactory.getInstance("X.509");
         boolean certificateAdded = false;
         for (int i = 0; i < CERT_AMEND.length; i++) {
-            CachedFile certCF = new CachedFile(CERT_AMEND[i]);
-            byte[] certBytes = certCF.getByteContent();
-            ByteArrayInputStream certIS = new ByteArrayInputStream(certBytes);
-            X509Certificate cert;
-
-            try {
-                cert = (X509Certificate) cf.generateCertificate(certIS);
+            try (CachedFile certCF = new CachedFile(CERT_AMEND[i])) {
+                byte[] certBytes = certCF.getByteContent();
+                ByteArrayInputStream certIS = new ByteArrayInputStream(certBytes);
+                X509Certificate cert = (X509Certificate) cf.generateCertificate(certIS);
                 MessageDigest md = MessageDigest.getInstance("SHA-256");
                 String sha1 = Utils.toHexString(md.digest(cert.getEncoded()));
                 if (!SHA_HASHES[i].equals(sha1)) {
-                    throw new RuntimeException(tr("Error adding certificate {0} - certificate fingerprint mismatch. Expected {1}, was {2}",
+                    throw new IllegalStateException(
+                            tr("Error adding certificate {0} - certificate fingerprint mismatch. Expected {1}, was {2}",
                             CERT_AMEND[i],
                             SHA_HASHES[i],
@@ -102,33 +85,21 @@
                             ));
                 }
-            } catch (CertificateException ex) {
-                throw new IOException(ex);
-            } catch (NoSuchAlgorithmException ex) {
-                throw new RuntimeException(ex);
-            }
-            if (certificateIsMissing(keyStore, cert)) {
-                if (Main.isDebugEnabled()) {
-                    Main.debug(tr("Adding certificate for TLS connections: {0}", cert.getSubjectX500Principal().getName()));
+                if (certificateIsMissing(keyStore, cert)) {
+                    if (Main.isDebugEnabled()) {
+                        Main.debug(tr("Adding certificate for TLS connections: {0}", cert.getSubjectX500Principal().getName()));
+                    }
+                    String alias = "josm:" + new File(CERT_AMEND[i]).getName();
+                    keyStore.setCertificateEntry(alias, cert);
+                    certificateAdded = true;
                 }
-                String alias = "josm:" + new File(CERT_AMEND[i]).getName();
-                try {
-                    keyStore.setCertificateEntry(alias, cert);
-                } catch (KeyStoreException ex) {
-                    throw new AssertionError(ex);
-                }
-                certificateAdded = true;
             }
         }
 
         if (certificateAdded) {
-            try {
-                TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
-                tmf.init(keyStore);
-                SSLContext sslContext = SSLContext.getInstance("TLS");
-                sslContext.init(null, tmf.getTrustManagers(), null);
-                SSLContext.setDefault(sslContext);
-            } catch (NoSuchAlgorithmException | KeyStoreException | KeyManagementException ex) {
-                throw new RuntimeException(ex);
-            }
+            TrustManagerFactory tmf = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
+            tmf.init(keyStore);
+            SSLContext sslContext = SSLContext.getInstance("TLS");
+            sslContext.init(null, tmf.getTrustManagers(), null);
+            SSLContext.setDefault(sslContext);
         }
     }
@@ -139,14 +110,10 @@
      * @param crt the certificate
      * @return true, if the certificate is not contained in the keystore
+     * @throws InvalidAlgorithmParameterException if the keystore does not contain at least one trusted certificate entry
+     * @throws KeyStoreException if the keystore has not been initialized
      */
-    private static boolean certificateIsMissing(KeyStore keyStore, X509Certificate crt) {
-        PKIXParameters params;
-        try {
-            params = new PKIXParameters(keyStore);
-        } catch (KeyStoreException ex) {
-            throw new AssertionError(ex);
-        } catch (InvalidAlgorithmParameterException ex) {
-            throw new RuntimeException(ex);
-        }
+    private static boolean certificateIsMissing(KeyStore keyStore, X509Certificate crt)
+            throws KeyStoreException, InvalidAlgorithmParameterException {
+        PKIXParameters params = new PKIXParameters(keyStore);
         String id = crt.getSubjectX500Principal().getName();
         for (TrustAnchor ta : params.getTrustAnchors()) {
Index: /trunk/src/org/openstreetmap/josm/io/OsmReader.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/io/OsmReader.java	(revision 10235)
@@ -95,9 +95,9 @@
 
     protected void throwException(String msg, Throwable th) throws XMLStreamException {
-        throw new OsmParsingException(msg, parser.getLocation(), th);
+        throw new XmlStreamParsingException(msg, parser.getLocation(), th);
     }
 
     protected void throwException(String msg) throws XMLStreamException {
-        throw new OsmParsingException(msg, parser.getLocation());
+        throw new XmlStreamParsingException(msg, parser.getLocation());
     }
 
@@ -560,37 +560,8 @@
     }
 
-    private static class OsmParsingException extends XMLStreamException {
-
-        OsmParsingException(String msg, Location location) {
-            super(msg); /* cannot use super(msg, location) because it messes with the message preventing localization */
-            this.location = location;
-        }
-
-        OsmParsingException(String msg, Location location, Throwable th) {
-            super(msg, th);
-            this.location = location;
-        }
-
-        @Override
-        public String getMessage() {
-            String msg = super.getMessage();
-            if (msg == null) {
-                msg = getClass().getName();
-            }
-            if (getLocation() == null)
-                return msg;
-            msg += ' ' + tr("(at line {0}, column {1})", getLocation().getLineNumber(), getLocation().getColumnNumber());
-            int offset = getLocation().getCharacterOffset();
-            if (offset > -1) {
-                msg += ". "+ tr("{0} bytes have been read", offset);
-            }
-            return msg;
-        }
-    }
-
     /**
      * Exception thrown after user cancelation.
      */
-    private static final class OsmParsingCanceledException extends OsmParsingException implements ImportCancelException {
+    private static final class OsmParsingCanceledException extends XmlStreamParsingException implements ImportCancelException {
         /**
          * Constructs a new {@code OsmParsingCanceledException}.
@@ -639,5 +610,5 @@
         } catch (IllegalDataException e) {
             throw e;
-        } catch (OsmParsingException e) {
+        } catch (XmlStreamParsingException e) {
             throw new IllegalDataException(e.getMessage(), e);
         } catch (XMLStreamException e) {
Index: /trunk/src/org/openstreetmap/josm/io/XmlStreamParsingException.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/io/XmlStreamParsingException.java	(revision 10235)
+++ /trunk/src/org/openstreetmap/josm/io/XmlStreamParsingException.java	(revision 10235)
@@ -0,0 +1,52 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.io;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import javax.xml.stream.Location;
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * Exception for unexpected processing errors during XML stream parsing.
+ * It uses proper JOSM i18n system to translate error message, including file location.
+ * @since 10235
+ */
+public class XmlStreamParsingException extends XMLStreamException {
+
+    /**
+     * Constructs a new {@code XmlStreamParsingException}.
+     * @param msg error message
+     * @param location file location
+     */
+    public XmlStreamParsingException(String msg, Location location) {
+        super(msg); /* cannot use super(msg, location) because it messes with the message preventing localization */
+        this.location = location;
+    }
+
+    /**
+     * Constructs a new {@code XmlStreamParsingException}.
+     * @param msg error message
+     * @param location file location
+     * @param th Throwable cause
+     */
+    public XmlStreamParsingException(String msg, Location location, Throwable th) {
+        super(msg, th);
+        this.location = location;
+    }
+
+    @Override
+    public String getMessage() {
+        String msg = super.getMessage();
+        if (msg == null) {
+            msg = getClass().getName();
+        }
+        if (getLocation() == null)
+            return msg;
+        msg += ' ' + tr("(at line {0}, column {1})", getLocation().getLineNumber(), getLocation().getColumnNumber());
+        int offset = getLocation().getCharacterOffset();
+        if (offset > -1) {
+            msg += ". "+ tr("{0} bytes have been read", offset);
+        }
+        return msg;
+    }
+}
Index: /trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java	(revision 10234)
+++ /trunk/src/org/openstreetmap/josm/tools/OverpassTurboQueryWizard.java	(revision 10235)
@@ -52,5 +52,5 @@
                     "}");
         } catch (ScriptException | IOException ex) {
-            throw new RuntimeException("Failed to initialize OverpassTurboQueryWizard", ex);
+            throw new IllegalStateException("Failed to initialize OverpassTurboQueryWizard", ex);
         }
     }
Index: /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 10234)
+++ /trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 10235)
@@ -7,4 +7,5 @@
 import java.io.IOException;
 import java.nio.file.Paths;
+import java.security.GeneralSecurityException;
 import java.text.MessageFormat;
 import java.util.Locale;
@@ -98,5 +99,5 @@
         try {
             CertificateAmendment.addMissingCertificates();
-        } catch (IOException ex) {
+        } catch (IOException | GeneralSecurityException ex) {
             throw new RuntimeException(ex);
         }
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java	(revision 10234)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java	(revision 10235)
@@ -5,5 +5,4 @@
 import static org.junit.Assert.assertTrue;
 
-import java.io.IOException;
 import java.util.Collection;
 import java.util.Collections;
@@ -24,5 +23,4 @@
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule;
 import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
-import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
 
@@ -51,9 +49,8 @@
     /**
      * Test that available map paint styles are valid.
-     * @throws IOException if any I/O error occurs
-     * @throws ParseException if the config file does not match MapCSS syntax
+     * @throws Exception in case of error
      */
     @Test
-    public void testValidityOfAvailableStyles() throws ParseException, IOException {
+    public void testValidityOfAvailableStyles() throws Exception {
         Collection<ExtendedSourceEntry> sources = new MapPaintPreference.MapPaintSourceEditor()
                 .loadAndGetAvailableSources();
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java	(revision 10234)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java	(revision 10235)
@@ -46,7 +46,8 @@
     /**
      * Test that available tagging presets are valid.
+     * @throws Exception in case of error
      */
     @Test
-    public void testValidityOfAvailablePresets() {
+    public void testValidityOfAvailablePresets() throws Exception {
         Collection<ExtendedSourceEntry> sources = new TaggingPresetPreference.TaggingPresetSourceEditor()
                 .loadAndGetAvailableSources();
Index: /trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java	(revision 10234)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java	(revision 10235)
@@ -14,5 +14,4 @@
 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker;
 import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.ParseResult;
-import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
 import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
 
@@ -32,9 +31,8 @@
     /**
      * Test that available tag checker rules are valid.
-     * @throws IOException if any I/O error occurs
-     * @throws ParseException if the config file does not match MapCSS syntax
+     * @throws Exception in case of error
      */
     @Test
-    public void testValidityOfAvailableRules() throws ParseException, IOException {
+    public void testValidityOfAvailableRules() throws Exception {
         Collection<ExtendedSourceEntry> sources = new ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor()
                 .loadAndGetAvailableSources();
