Ignore:
Timestamp:
2014-10-18T23:07:52+02:00 (11 years ago)
Author:
donvip
Message:

[josm_plugins] fix Java 7 / unused code warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/Address.java

    r29801 r30737  
    131131        MapView mv = Main.map.mapView;
    132132        Point mousePos = e.getPoint();
    133         List<Way> mouseOnExistingWays = new ArrayList<Way>();
    134         List<Way> mouseOnExistingBuildingWays = new ArrayList<Way>();
    135         mouseOnExistingWays = new ArrayList<Way>();
     133        List<Way> mouseOnExistingWays = new ArrayList<>();
     134        List<Way> mouseOnExistingBuildingWays = new ArrayList<>();
     135        mouseOnExistingWays = new ArrayList<>();
    136136        Node currentMouseNode = mv.getNearestNode(mousePos, OsmPrimitive.isSelectablePredicate);
    137137        if (currentMouseNode != null) {
     
    144144                    && !inputStreet.getText().equals("")) {
    145145                // house number already present but not linked to a street
    146                 Collection<Command> cmds = new LinkedList<Command>();
     146                Collection<Command> cmds = new LinkedList<>();
    147147                addStreetNameOrRelation(currentMouseNode, cmds);
    148148                Command c = new SequenceCommand("Add node address", cmds);
     
    164164                        inputStreet.setText(currentMouseNode.get(tagHouseStreet));
    165165                        if (ctrl) {
    166                             Collection<Command> cmds = new LinkedList<Command>();
     166                            Collection<Command> cmds = new LinkedList<>();
    167167                            addAddrToPrimitive(currentMouseNode, cmds);
    168168                            if (num == null)
     
    179179                            applyInputNumberChange();
    180180                        }
    181                         Collection<Command> cmds = new LinkedList<Command>();
     181                        Collection<Command> cmds = new LinkedList<>();
    182182                        addAddrToPrimitive(currentMouseNode, cmds);
    183183                    } else {
     
    206206                    Toolkit.getDefaultToolkit().beep();
    207207                } else {
    208                     Collection<Command> cmds = new LinkedList<Command>();
     208                    Collection<Command> cmds = new LinkedList<>();
    209209                    if (ctrl) {
    210210                        applyInputNumberChange();
     
    305305        cmds.add(new AddCommand(n));
    306306        List<WaySegment> wss = Main.map.mapView.getNearestWaySegments(e.getPoint(), OsmPrimitive.isSelectablePredicate);
    307         Map<Way, List<Integer>> insertPoints = new HashMap<Way, List<Integer>>();
     307        Map<Way, List<Integer>> insertPoints = new HashMap<>();
    308308        for (WaySegment ws : wss) {
    309309            List<Integer> is;
     
    311311                is = insertPoints.get(ws.way);
    312312            } else {
    313                 is = new ArrayList<Integer>();
     313                is = new ArrayList<>();
    314314                insertPoints.put(ws.way, is);
    315315            }
     
    317317            is.add(ws.lowerIndex);
    318318        }
    319         Set<Pair<Node,Node>> segSet = new HashSet<Pair<Node,Node>>();
    320         ArrayList<Way> replacedWays = new ArrayList<Way>();
    321         ArrayList<Way> reuseWays = new ArrayList<Way>();
     319        Set<Pair<Node,Node>> segSet = new HashSet<>();
     320        ArrayList<Way> replacedWays = new ArrayList<>();
     321        ArrayList<Way> reuseWays = new ArrayList<>();
    322322        for (Map.Entry<Way, List<Integer>> insertPoint : insertPoints.entrySet()) {
    323323            Way w = insertPoint.getKey();
     
    326326            pruneSuccsAndReverse(is);
    327327            for (int i : is) {
    328                 segSet.add(Pair.sort(new Pair<Node,Node>(w.getNode(i), w.getNode(i+1))));
     328                segSet.add(Pair.sort(new Pair<>(w.getNode(i), w.getNode(i+1))));
    329329            }
    330330            for (int i : is) {
     
    403403        //if (is.size() < 2) return;
    404404
    405         HashSet<Integer> is2 = new HashSet<Integer>();
     405        HashSet<Integer> is2 = new HashSet<>();
    406406        for (int i : is) {
    407407            if (!is2.contains(i - 1) && !is2.contains(i + 1)) {
     
    541541   
    542542    private void setNewSelection(OsmPrimitive osm) {
    543         Collection<OsmPrimitive> newSelection = new LinkedList<OsmPrimitive>(Main.main.getCurrentDataSet().getSelected());
     543        Collection<OsmPrimitive> newSelection = new LinkedList<>(Main.main.getCurrentDataSet().getSelected());
    544544        newSelection.clear();
    545545        newSelection.add(osm);
Note: See TracChangeset for help on using the changeset viewer.