Ignore:
Timestamp:
2016-05-15T00:51:10+02:00 (8 years ago)
Author:
Don-vip
Message:

sonar - squid:S2221 - "Exception" should not be caught when not required by called methods

File:
1 edited

Legend:

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

    r10043 r10212  
    252252     * @param info imagery info
    253253     * @throws IOException if any I/O error occurs
     254     * @throws IllegalArgumentException if any other error happens for the given imagery info
    254255     */
    255256    public WMTSTileSource(ImageryInfo info) throws IOException {
     
    290291    }
    291292
    292     private Collection<Layer> getCapabilities() {
     293    /**
     294     * @return capabilities
     295     * @throws IOException in case of any I/O error
     296     * @throws IllegalArgumentException in case of any other error
     297     */
     298    private Collection<Layer> getCapabilities() throws IOException {
    293299        XMLInputFactory factory = XMLInputFactory.newFactory();
    294300        // do not try to load external entities, nor validate the XML
     
    320326            }
    321327            return ret;
    322         } catch (Exception e) {
     328        } catch (XMLStreamException e) {
    323329            throw new IllegalArgumentException(e);
    324330        }
Note: See TracChangeset for help on using the changeset viewer.