Ignore:
Timestamp:
2016-05-17T00:43:47+02:00 (8 years ago)
Author:
Don-vip
Message:

findbugs - DB_DUPLICATE_SWITCH_CLAUSES + REC_CATCH_EXCEPTION + UC_USELESS_CONDITION + OS_OPEN_STREAM_EXCEPTION_PATH + ICAST_INTEGER_MULTIPLY_CAST_TO_LONG

Location:
trunk/src/org/openstreetmap/josm/actions
Files:
2 edited

Legend:

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

    r10062 r10234  
    4242 * @author imi
    4343 */
    44 public class AboutAction extends JosmAction {
     44public final class AboutAction extends JosmAction {
    4545
    4646    /**
     
    130130            displayErrorMessage(ta, tr("Failed to locate resource ''{0}''.", filePath));
    131131        } else {
    132             try {
    133                 BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
     132            try (InputStreamReader reader = new InputStreamReader(is, "UTF-8");
     133                 BufferedReader br = new BufferedReader(reader)) {
    134134                String line;
    135135                while ((line = br.readLine()) != null) {
    136136                    ta.append(line+'\n');
    137137                }
    138                 br.close();
    139138            } catch (IOException e) {
    140139                Main.warn(e);
  • trunk/src/org/openstreetmap/josm/actions/UploadSelectionAction.java

    r9067 r10234  
    341341                        // our local dataset includes a deleted parent of a primitive we want
    342342                        // to delete. Include this parent in the collection of uploaded primitives
    343                         //
    344343                        if (myDeletedParent != null && myDeletedParent.isDeleted()) {
    345344                            if (!toUpload.contains(myDeletedParent)) {
     
    352351                    }
    353352                }
    354             } catch (Exception e) {
     353            } catch (OsmTransferException e) {
    355354                if (canceled)
    356355                    // ignore exception
Note: See TracChangeset for help on using the changeset viewer.