Changeset 10632 in josm


Ignore:
Timestamp:
2016-07-24T23:50:15+02:00 (3 years ago)
Author:
Don-vip
Message:

sonar - squid:RedundantThrowsDeclarationCheck - Throws declarations should not be superfluous

Location:
trunk/src/org/openstreetmap/josm
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/MultipolygonBuilder.java

    r10469 r10632  
    170170     * @throws JoinedPolygonCreationException if the creation fails.
    171171     */
    172     public static List<JoinedPolygon> joinWays(Collection<Way> ways) throws JoinedPolygonCreationException {
     172    public static List<JoinedPolygon> joinWays(Collection<Way> ways) {
    173173        List<JoinedPolygon> joinedWays = new ArrayList<>();
    174174
  • trunk/src/org/openstreetmap/josm/data/osm/Relation.java

    r10608 r10632  
    484484    }
    485485
    486     private void checkMembers() throws DataIntegrityProblemException {
     486    /**
     487     * Checks that members are part of the same dataset, and that they're not deleted.
     488     * @throws DataIntegrityProblemException if one the above conditions is not met
     489     */
     490    private void checkMembers() {
    487491        DataSet dataSet = getDataSet();
    488492        if (dataSet != null) {
     
    503507    }
    504508
    505     private void fireMembersChanged() throws DataIntegrityProblemException {
     509    /**
     510     * Fires the {@code RelationMembersChangedEvent} to listeners.
     511     * @throws DataIntegrityProblemException if members are not valid
     512     * @see #checkMembers
     513     */
     514    private void fireMembersChanged() {
    506515        checkMembers();
    507516        if (getDataSet() != null) {
  • trunk/src/org/openstreetmap/josm/data/osm/Way.java

    r9979 r10632  
    448448     * @since 1313
    449449     */
    450     public void addNode(int offs, Node n) throws IndexOutOfBoundsException {
     450    public void addNode(int offs, Node n) {
    451451        if (n == null) return;
    452452
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryRelation.java

    r10378 r10632  
    111111     * @throws IndexOutOfBoundsException if idx is out of bounds
    112112     */
    113     public RelationMemberData getRelationMember(int idx) throws IndexOutOfBoundsException {
     113    public RelationMemberData getRelationMember(int idx) {
    114114        if (idx < 0 || idx >= members.size())
    115115            throw new IndexOutOfBoundsException(
  • trunk/src/org/openstreetmap/josm/data/osm/history/HistoryWay.java

    r9067 r10632  
    9797     * @throws IndexOutOfBoundsException if  idx &lt; 0 || idx &gt;= {#see {@link #getNumNodes()}
    9898     */
    99     public long getNodeId(int idx) throws IndexOutOfBoundsException {
     99    public long getNodeId(int idx) {
    100100        if (idx < 0 || idx >= nodeIds.size())
    101101            throw new IndexOutOfBoundsException(tr("Parameter {0} not in range 0..{1}. Got ''{2}''.", "idx", nodeIds.size(), idx));
  • trunk/src/org/openstreetmap/josm/data/validation/tests/ConditionalKeys.java

    r10469 r10632  
    102102        }
    103103
    104         public static List<ConditionalValue> parse(String value) throws ConditionalParsingException {
     104        /**
     105         * Parses the condition values as string.
     106         * @param value value, must match {@code <restriction-value> @ <condition>[;<restriction-value> @ <condition>]} pattern
     107         * @return list of {@code ConditionalValue}s
     108         * @throws ConditionalParsingException if {@code value} does not match expected pattern
     109         */
     110        public static List<ConditionalValue> parse(String value) {
    105111            // <restriction-value> @ <condition>[;<restriction-value> @ <condition>]
    106112            final List<ConditionalValue> r = new ArrayList<>();
  • trunk/src/org/openstreetmap/josm/data/validation/tests/TagChecker.java

    r10608 r10632  
    718718            public boolean valueBool;
    719719
    720             private static Pattern getPattern(String str) throws PatternSyntaxException {
     720            private static Pattern getPattern(String str) {
    721721                if (str.endsWith("/i"))
    722722                    return Pattern.compile(str.substring(1, str.length()-2), Pattern.CASE_INSENSITIVE);
     
    727727            }
    728728
    729             public CheckerElement(String exp) throws PatternSyntaxException {
     729            public CheckerElement(String exp) {
    730730                Matcher m = Pattern.compile("(.+)([!=]=)(.+)").matcher(exp);
    731731                m.matches();
  • trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java

    r10627 r10632  
    980980     * @throws NoGpxTimestamps when the gpx track does not contain a timestamp
    981981     */
    982     static Pair<Timezone, Offset> autoGuess(List<ImageEntry> imgs, GpxData gpx) throws IndexOutOfBoundsException, NoGpxTimestamps {
     982    static Pair<Timezone, Offset> autoGuess(List<ImageEntry> imgs, GpxData gpx) throws NoGpxTimestamps {
    983983
    984984        // Init variables
  • trunk/src/org/openstreetmap/josm/io/BoundingBoxDownloader.java

    r10253 r10632  
    203203
    204204    @Override
    205     public List<Note> parseNotes(int noteLimit, int daysClosed, ProgressMonitor progressMonitor)
    206             throws OsmTransferException, MoreNotesException {
     205    public List<Note> parseNotes(int noteLimit, int daysClosed, ProgressMonitor progressMonitor) throws OsmTransferException {
    207206        progressMonitor.beginTask(tr("Downloading notes"));
    208207        CheckParameterUtil.ensureThat(noteLimit > 0, "Requested note limit is less than 1.");
  • trunk/src/org/openstreetmap/josm/io/Capabilities.java

    r10378 r10632  
    9898     * @throws NumberFormatException if the value is not a valid double
    9999     */
    100     public Double getDouble(String element, String attribute) throws NumberFormatException {
     100    public Double getDouble(String element, String attribute) {
    101101        String s = get(element, attribute);
    102102        if (s == null) return null;
  • trunk/src/org/openstreetmap/josm/io/NmeaReader.java

    r10627 r10632  
    447447    }
    448448
    449     private static LatLon parseLatLon(String ns, String ew, String dlat, String dlon)
    450     throws NumberFormatException {
     449    private static LatLon parseLatLon(String ns, String ew, String dlat, String dlon) {
    451450        String widthNorth = dlat.trim();
    452451        String lengthEast = dlon.trim();
  • trunk/src/org/openstreetmap/josm/io/OsmExporter.java

    r9537 r10632  
    55
    66import java.io.File;
    7 import java.io.FileNotFoundException;
    87import java.io.IOException;
    98import java.io.OutputStream;
     
    7675    }
    7776
    78     protected static OutputStream getOutputStream(File file) throws FileNotFoundException, IOException {
     77    protected static OutputStream getOutputStream(File file) throws IOException {
    7978        return Compression.getCompressedFileOutputStream(file);
    8079    }
     
    125124    }
    126125
    127     protected void doSave(File file, OsmDataLayer layer) throws IOException, FileNotFoundException {
     126    protected void doSave(File file, OsmDataLayer layer) throws IOException {
    128127        // create outputstream and wrap it with gzip or bzip, if necessary
    129128        try (
  • trunk/src/org/openstreetmap/josm/io/remotecontrol/RemoteControlHttpsServer.java

    r10627 r10632  
    363363     * @param ipv6 Whether IPv6 or IPv4 server should be started
    364364     * @throws IOException when connection errors
    365      * @throws NoSuchAlgorithmException if the JVM does not support TLS (can not happen)
    366365     * @throws GeneralSecurityException in case of SSL setup errors
    367366     * @since 8339
    368367     */
    369     public RemoteControlHttpsServer(int port, boolean ipv6) throws IOException, NoSuchAlgorithmException, GeneralSecurityException {
     368    public RemoteControlHttpsServer(int port, boolean ipv6) throws IOException, GeneralSecurityException {
    370369        super("RemoteControl HTTPS Server");
    371370        this.setDaemon(true);
  • trunk/src/org/openstreetmap/josm/io/session/SessionReader.java

    r10615 r10632  
    606606    }
    607607
    608     private static InputStream getZipInputStream(ZipFile zipFile) throws ZipException, IOException, IllegalDataException {
     608    private static InputStream getZipInputStream(ZipFile zipFile) throws IOException, IllegalDataException {
    609609        ZipEntry josEntry = null;
    610610        Enumeration<? extends ZipEntry> entries = zipFile.entries();
Note: See TracChangeset for help on using the changeset viewer.