Ignore:
Timestamp:
2017-01-12T01:38:04+01:00 (3 years ago)
Author:
Don-vip
Message:

sonar - fb-contrib:BED_BOGUS_EXCEPTION_DECLARATION - Correctness - Non derivable method declares throwing an exception that isn't thrown

Location:
trunk/src/org/openstreetmap/josm/data
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/imagery/GetCapabilitiesParseHelper.java

    r11018 r11453  
    22package org.openstreetmap.josm.data.imagery;
    33
    4 import java.io.IOException;
    54import java.io.InputStream;
    65import java.net.MalformedURLException;
     
    7574     * @param in InputStream with pointing to GetCapabilities XML stream
    7675     * @return safe XMLStreamReader, that is not validating external entities, nor loads DTD's
    77      * @throws IOException if any I/O error occurs
    7876     * @throws XMLStreamException if any XML stream error occurs
    7977     */
    80     public static XMLStreamReader getReader(InputStream in) throws IOException, XMLStreamException {
     78    public static XMLStreamReader getReader(InputStream in) throws XMLStreamException {
    8179        XMLInputFactory factory = XMLInputFactory.newFactory();
    8280        // do not try to load external entities, nor validate the XML
  • trunk/src/org/openstreetmap/josm/data/imagery/TMSCachedTileLoader.java

    r11438 r11453  
    22package org.openstreetmap.josm.data.imagery;
    33
    4 import java.io.IOException;
    54import java.util.Map;
    65import java.util.concurrent.ThreadPoolExecutor;
     
    6059     * @param readTimeout       to remote resource
    6160     * @param headers           HTTP headers to be sent along with request
    62      * @throws IOException      when cache initialization fails
    6361     */
    6462    public TMSCachedTileLoader(TileLoaderListener listener, ICacheAccess<String, BufferedImageCacheEntry> cache,
    65             int connectTimeout, int readTimeout, Map<String, String> headers) throws IOException {
     63            int connectTimeout, int readTimeout, Map<String, String> headers) {
    6664        CheckParameterUtil.ensureParameterNotNull(cache, "cache");
    6765        this.cache = cache;
  • trunk/src/org/openstreetmap/josm/data/imagery/WMSCachedTileLoader.java

    r11438 r11453  
    22package org.openstreetmap.josm.data.imagery;
    33
    4 import java.io.IOException;
    54import java.util.Map;
    65
     
    2524     */
    2625    public static final IntegerProperty THREAD_LIMIT = new IntegerProperty("imagery.wms.loader.maxjobs", 3);
     26
    2727    /**
    2828     * Creates a TileLoader with separate WMS downloader.
     
    3333     * @param readTimeout from tile source
    3434     * @param headers to be sent with requests
    35      * @throws IOException when there is a problem creating cache repository
    3635     */
    3736    public WMSCachedTileLoader(TileLoaderListener listener, ICacheAccess<String, BufferedImageCacheEntry> cache,
    38             int connectTimeout, int readTimeout, Map<String, String> headers) throws IOException {
     37            int connectTimeout, int readTimeout, Map<String, String> headers) {
    3938
    4039        super(listener, cache, connectTimeout, readTimeout, headers);
  • trunk/src/org/openstreetmap/josm/data/oauth/SignpostAdapters.java

    r10201 r11453  
    108108
    109109        @Override
    110         public InputStream getMessagePayload() throws IOException {
     110        public InputStream getMessagePayload() {
    111111            return null;
    112112        }
     
    136136
    137137        @Override
    138         public int getStatusCode() throws IOException {
     138        public int getStatusCode() {
    139139            return response.getResponseCode();
    140140        }
    141141
    142142        @Override
    143         public String getReasonPhrase() throws Exception {
     143        public String getReasonPhrase() {
    144144            return response.getResponseMessage();
    145145        }
  • trunk/src/org/openstreetmap/josm/data/preferences/PreferencesReader.java

    r10306 r11453  
    5252     * @param defaults true when reading from the cache file for default preferences,
    5353     * false for the regular preferences config file
    54      * @throws IOException if any I/O error occurs
    55      * @throws XMLStreamException if any XML stream error occurs
    56      */
    57     public PreferencesReader(File file, boolean defaults) throws IOException, XMLStreamException {
     54     */
     55    public PreferencesReader(File file, boolean defaults) {
    5856        this.defaults = defaults;
    5957        this.reader = null;
     
    6664     * @param defaults true when reading from the cache file for default preferences,
    6765     * false for the regular preferences config file
    68      * @throws XMLStreamException if any XML stream error occurs
    69      */
    70     public PreferencesReader(Reader reader, boolean defaults) throws XMLStreamException {
     66     */
     67    public PreferencesReader(Reader reader, boolean defaults) {
    7168        this.defaults = defaults;
    7269        this.reader = reader;
Note: See TracChangeset for help on using the changeset viewer.