Ignore:
Timestamp:
2016-06-01T23:17:40+02:00 (4 years ago)
Author:
Don-vip
Message:

sonar - squid:S1854 - Dead stores should be removed

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

Legend:

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

    r8870 r10308  
    247247        int nodeCount = nodes.size();
    248248        // Search first fixed node
    249         int startPosition = 0;
     249        int startPosition;
    250250        for (startPosition = 0; startPosition < nodeCount; startPosition++) {
    251251            if (fixNodes.contains(nodes.get(startPosition % nodeCount)))
  • trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java

    r9087 r10308  
    173173
    174174        try {
    175             Command cmd = null;
     175            Command cmd;
    176176            // Decide what to align based on selection:
    177177
     
    182182                // Only 1 node selected -> align this node relative to referers way
    183183                Node selectedNode = selectedNodes.get(0);
    184                 List<Way> involvedWays = null;
     184                List<Way> involvedWays;
    185185                if (selectedWays.isEmpty())
    186186                    // No selected way, all way containing this node are used
  • trunk/src/org/openstreetmap/josm/actions/JoinAreasAction.java

    r10174 r10308  
    775775     * @param isInner - if true, reverts the direction (for multipolygon islands)
    776776     * @return list of parts, marked with the inside orientation.
    777      * @throws IllegalArgumentException if parts is empty
     777     * @throws IllegalArgumentException if parts is empty or not circular
    778778     */
    779779    private static List<WayInPolygon> markWayInsideSide(List<Way> parts, boolean isInner) {
     
    785785
    786786            if (!parts.get(pos).lastNode().equals(parts.get((pos + 1) % parts.size()).firstNode()))
    787                 throw new RuntimeException("Way not circular");
     787                throw new IllegalArgumentException("Way not circular");
    788788
    789789            nextWayMap.put(parts.get(pos), parts.get((pos + 1) % parts.size()));
     
    818818
    819819        if (topNode.equals(topWay.firstNode()) || topNode.equals(topWay.lastNode())) {
    820             Node headNode = null; // the node at junction
    821             Node prevNode = null; // last node from previous path
    822             wayClockwise = false;
     820            Node headNode; // the node at junction
     821            Node prevNode; // last node from previous path
    823822
    824823            //node is in split point - find the outermost way from this point
  • trunk/src/org/openstreetmap/josm/actions/downloadtasks/DownloadOsmChangeTask.java

    r10001 r10308  
    149149                    HistoryOsmPrimitive hp = history.getByDate(date);
    150150                    if (hp != null) {
    151                         PrimitiveData data = null;
     151                        PrimitiveData data;
    152152
    153153                        switch (p.getType()) {
  • trunk/src/org/openstreetmap/josm/actions/mapmode/DrawAction.java

    r10303 r10308  
    398398
    399399        boolean newNode = false;
    400         Node n = null;
    401 
    402         n = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate);
     400        Node n = Main.map.mapView.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate);
    403401        if (ctrl) {
    404402            Iterator<Way> it = getCurrentDataSet().getSelectedWays().iterator();
  • trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java

    r10115 r10308  
    684684            wnew.addNode(insertionPoint, n2New);
    685685            wayWasModified = true;
    686             insertionPoint++;
    687686            cmds.add(new AddCommand(n2New));
    688687            changedNodes.add(n2New);
  • trunk/src/org/openstreetmap/josm/actions/mapmode/SelectAction.java

    r10179 r10308  
    11961196                Pair<Node, Node> vnp = null, wnp = new Pair<>(null, null);
    11971197
    1198                 Way w = null;
    11991198                for (WaySegment ws : mv.getNearestWaySegments(p, mv.isSelectablePredicate)) {
    1200                     w = ws.way;
     1199                    Way w = ws.way;
    12011200
    12021201                    wnp.a = w.getNode(ws.lowerIndex);
  • trunk/src/org/openstreetmap/josm/actions/search/SearchCompiler.java

    r10300 r10308  
    680680                }
    681681            } else {
    682                 String mv = null;
     682                String mv;
    683683
    684684                if ("timestamp".equals(key) && osm instanceof OsmPrimitive) {
Note: See TracChangeset for help on using the changeset viewer.