Changeset 13068 in josm


Ignore:
Timestamp:
2017-11-01T19:35:45+01:00 (7 years ago)
Author:
Don-vip
Message:

sonar - fix a few issues

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

Legend:

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

    r13016 r13068  
    601601        // Dataset retrieving allows to call this code without relying on Main.getCurrentDataSet(), thus, on a mapview instance
    602602        if (!areas.isEmpty()) {
    603             ds = areas.iterator().next().getOuterWay().getDataSet();
     603            ds = areas.get(0).getOuterWay().getDataSet();
    604604        }
    605605
  • trunk/src/org/openstreetmap/josm/gui/bugreport/JosmUpdatePanel.java

    r13019 r13068  
    6161
    6262    private static int getTestedVersion() {
    63         try {
    64             CachedFile testedVersion = new CachedFile(Main.getJOSMWebsite() + "/tested");
    65             testedVersion.setMaxAge(60 * 15); // 15 Minutes
     63        try (CachedFile testedVersion = new CachedFile(Main.getJOSMWebsite() + "/tested")) {
     64            testedVersion.setMaxAge(60L * 15); // 15 Minutes
    6665            String testedString = new String(testedVersion.getByteContent(), StandardCharsets.ISO_8859_1);
    6766            return Integer.parseInt(testedString.trim());
Note: See TracChangeset for help on using the changeset viewer.