Ignore:
Timestamp:
2016-05-17T00:43:47+02:00 (3 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/io/DownloadFileTask.java

    r10173 r10234  
    119119                byte[] buffer = new byte[32768];
    120120                int count = 0;
    121                 long p1 = 0, p2 = 0;
     121                long p1 = 0;
     122                long p2;
    122123                for (int read = in.read(buffer); read != -1; read = in.read(buffer)) {
    123124                    out.write(buffer, 0, read);
    124125                    count += read;
    125126                    if (canceled) break;
    126                     p2 = 100 * count / size;
     127                    p2 = 100L * count / size;
    127128                    if (p2 != p1) {
    128129                        progressMonitor.setTicks((int) p2);
Note: See TracChangeset for help on using the changeset viewer.