Changeset 10235 in josm for trunk/test


Ignore:
Timestamp:
2016-05-17T02:02:30+02:00 (4 years ago)
Author:
Don-vip
Message:

sonar - squid:S00112 - Generic exceptions should never be thrown

Location:
trunk/test/unit/org/openstreetmap/josm
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java

    r10222 r10235  
    77import java.io.IOException;
    88import java.nio.file.Paths;
     9import java.security.GeneralSecurityException;
    910import java.text.MessageFormat;
    1011import java.util.Locale;
     
    9899        try {
    99100            CertificateAmendment.addMissingCertificates();
    100         } catch (IOException ex) {
     101        } catch (IOException | GeneralSecurityException ex) {
    101102            throw new RuntimeException(ex);
    102103        }
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/MapPaintPreferenceTestIT.java

    r10222 r10235  
    55import static org.junit.Assert.assertTrue;
    66
    7 import java.io.IOException;
    87import java.util.Collection;
    98import java.util.Collections;
     
    2423import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSRule;
    2524import org.openstreetmap.josm.gui.mappaint.mapcss.MapCSSStyleSource;
    26 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
    2725import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
    2826
     
    5149    /**
    5250     * Test that available map paint styles are valid.
    53      * @throws IOException if any I/O error occurs
    54      * @throws ParseException if the config file does not match MapCSS syntax
     51     * @throws Exception in case of error
    5552     */
    5653    @Test
    57     public void testValidityOfAvailableStyles() throws ParseException, IOException {
     54    public void testValidityOfAvailableStyles() throws Exception {
    5855        Collection<ExtendedSourceEntry> sources = new MapPaintPreference.MapPaintSourceEditor()
    5956                .loadAndGetAvailableSources();
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/map/TaggingPresetPreferenceTestIT.java

    r10222 r10235  
    4646    /**
    4747     * Test that available tagging presets are valid.
     48     * @throws Exception in case of error
    4849     */
    4950    @Test
    50     public void testValidityOfAvailablePresets() {
     51    public void testValidityOfAvailablePresets() throws Exception {
    5152        Collection<ExtendedSourceEntry> sources = new TaggingPresetPreference.TaggingPresetSourceEditor()
    5253                .loadAndGetAvailableSources();
  • trunk/test/unit/org/openstreetmap/josm/gui/preferences/validator/ValidatorTagCheckerRulesPreferenceTestIT.java

    r9669 r10235  
    1414import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker;
    1515import org.openstreetmap.josm.data.validation.tests.MapCSSTagChecker.ParseResult;
    16 import org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException;
    1716import org.openstreetmap.josm.gui.preferences.SourceEditor.ExtendedSourceEntry;
    1817
     
    3231    /**
    3332     * Test that available tag checker rules are valid.
    34      * @throws IOException if any I/O error occurs
    35      * @throws ParseException if the config file does not match MapCSS syntax
     33     * @throws Exception in case of error
    3634     */
    3735    @Test
    38     public void testValidityOfAvailableRules() throws ParseException, IOException {
     36    public void testValidityOfAvailableRules() throws Exception {
    3937        Collection<ExtendedSourceEntry> sources = new ValidatorTagCheckerRulesPreference.TagCheckerRulesSourceEditor()
    4038                .loadAndGetAvailableSources();
Note: See TracChangeset for help on using the changeset viewer.