Ignore:
Timestamp:
2016-12-09T23:31:13+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - squid:S00112 - Generic exceptions should never be thrown: define JosmRuntimeException

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r11330 r11374  
    556556            md = MessageDigest.getInstance("MD5");
    557557        } catch (NoSuchAlgorithmException e) {
    558             throw new RuntimeException(e);
     558            throw new JosmRuntimeException(e);
    559559        }
    560560        byte[] byteData = data.getBytes(StandardCharsets.UTF_8);
     
    621621                }
    622622            }
    623             if (parentless == null) throw new RuntimeException();
     623            if (parentless == null) throw new JosmRuntimeException("parentless");
    624624            sorted.add(parentless);
    625625            deps.remove(parentless);
     
    628628            }
    629629        }
    630         if (sorted.size() != size) throw new RuntimeException();
     630        if (sorted.size() != size) throw new JosmRuntimeException("Wrong size");
    631631        return sorted;
    632632    }
Note: See TracChangeset for help on using the changeset viewer.