Changeset 11453 in josm for trunk/src


Ignore:
Timestamp:
2017-01-12T01:38:04+01:00 (8 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
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r11447 r11453  
    10401040        }
    10411041
    1042         private Nth(int nth, boolean modulo) throws ParseError {
     1042        private Nth(int nth, boolean modulo) {
    10431043            this.nth = nth;
    10441044            this.modulo = modulo;
  • 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;
  • trunk/src/org/openstreetmap/josm/io/Capabilities.java

    r10632 r11453  
    242242
    243243        @Override
    244         public void startDocument() throws SAXException {
     244        public void startDocument() {
    245245            capabilities = new Capabilities();
    246246        }
    247247
    248248        @Override
    249         public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
     249        public void startElement(String namespaceURI, String localName, String qName, Attributes atts) {
    250250            for (int i = 0; i < atts.getLength(); i++) {
    251251                capabilities.put(qName, atts.getQName(i), atts.getValue(i));
  • trunk/src/org/openstreetmap/josm/io/NoteReader.java

    r11100 r11453  
    202202     * Initializes the reader with a given InputStream
    203203     * @param source - InputStream containing Notes XML
    204      * @throws IOException if any I/O error occurs
    205      */
    206     public NoteReader(InputStream source) throws IOException {
     204     */
     205    public NoteReader(InputStream source) {
    207206        this.inputSource = new InputSource(source);
    208207    }
     
    211210     * Initializes the reader with a string as a source
    212211     * @param source UTF-8 string containing Notes XML to parse
    213      * @throws IOException if any I/O error occurs
    214      */
    215     public NoteReader(String source) throws IOException {
     212     */
     213    public NoteReader(String source) {
    216214        this.inputSource = new InputSource(new ByteArrayInputStream(source.getBytes(StandardCharsets.UTF_8)));
    217215    }
Note: See TracChangeset for help on using the changeset viewer.