Ignore:
Timestamp:
2015-05-15T23:49:31+02:00 (6 years ago)
Author:
Don-vip
Message:

fix some Findbugs violations

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

Legend:

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

    r8342 r8357  
    337337     * Class that represent a line
    338338     */
    339     private class Line {
     339    private static class Line {
    340340
    341341        /**
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r8342 r8357  
    765765        List<WayInPolygon> result = new ArrayList<>();
    766766
    767         //prepare prev and next maps
     767        //prepare next map
    768768        Map<Way, Way> nextWayMap = new HashMap<>();
    769         Map<Way, Way> prevWayMap = new HashMap<>();
    770769
    771770        for (int pos = 0; pos < parts.size(); pos ++) {
     
    775774
    776775            nextWayMap.put(parts.get(pos), parts.get((pos + 1) % parts.size()));
    777             prevWayMap.put(parts.get(pos), parts.get((pos + parts.size() - 1) % parts.size()));
    778776        }
    779777
  • trunk/src/org/openstreetmap/josm/actions/RestartAction.java

    r8356 r8357  
    114114                String[] mainCommand = System.getProperty("sun.java.command").split(" ");
    115115                // look for a .jar in all chunks to support paths with spaces (fix #9077)
    116                 String jarPath = mainCommand[0];
    117                 for (int i = 1; i < mainCommand.length && !jarPath.endsWith(".jar"); i++) {
    118                     jarPath += " " + mainCommand[i];
    119                 }
     116                StringBuilder sb = new StringBuilder(mainCommand[0]);
     117                for (int i = 1; i < mainCommand.length && !mainCommand[i-1].endsWith(".jar"); i++) {
     118                    sb.append(" ").append(mainCommand[i]);
     119                }
     120                String jarPath = sb.toString();
    120121                // program main is a jar
    121122                if (jarPath.endsWith(".jar")) {
Note: See TracChangeset for help on using the changeset viewer.