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

[josm_plugins] fix Java 7 / unused code warnings

Location:
applications/editors/josm/plugins/terracer/src/terracer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/terracer/src/terracer/HouseNumberInputDialog.java

    r30643 r30737  
    366366     */
    367367    TreeSet<String> createAutoCompletionInfo() {
    368         final TreeSet<String> names = new TreeSet<String>();
     368        final TreeSet<String> names = new TreeSet<>();
    369369        for (OsmPrimitive osm : Main.main.getCurrentDataSet()
    370370                .allNonDeletedPrimitives()) {
  • applications/editors/josm/plugins/terracer/src/terracer/ReverseTerraceAction.java

    r30612 r30737  
    5555        // Set to keep track of all the nodes that have been visited - that is: if
    5656        // we encounter them again we will not follow onto the connected ways.
    57         HashSet<Node> visitedNodes = new HashSet<Node>();
     57        HashSet<Node> visitedNodes = new HashSet<>();
    5858
    5959        // Set to keep track of the ways the algorithm has seen, but not yet visited.
    6060        // Since when a way is visited all of its nodes are marked as visited, there
    6161        // is no need to keep a visitedWays set.
    62         HashSet<Way> front = new HashSet<Way>();
     62        HashSet<Way> front = new HashSet<>();
    6363
    6464        // Find the first or last way from the teracced houses.
     
    8585
    8686        // This is like a visitedWays set, but in a linear order.
    87         LinkedList<Way> orderedWays = new LinkedList<Way>();
     87        LinkedList<Way> orderedWays = new LinkedList<>();
    8888
    8989        // And the tags to reverse on the orderedWays.
    90         LinkedList<String> houseNumbers = new LinkedList<String>();
     90        LinkedList<String> houseNumbers = new LinkedList<>();
    9191
    9292        while (front.size() > 0) {
     
    114114        }
    115115
    116         Collection<Command> commands = new LinkedList<Command>();
     116        Collection<Command> commands = new LinkedList<>();
    117117        for (int i = 0; i < orderedWays.size(); ++i) {
    118118            commands.add(new ChangePropertyCommand(
  • applications/editors/josm/plugins/terracer/src/terracer/TerracerAction.java

    r30614 r30737  
    8282
    8383    protected static final Set<Relation> findAssociatedStreets(Collection<OsmPrimitive> objects) {
    84         Set<Relation> result = new HashSet<Relation>();
     84        Set<Relation> result = new HashSet<>();
    8585        if (objects != null) {
    8686            for (OsmPrimitive c : objects) {
     
    113113        Way street = null;
    114114        String streetname = null;
    115         ArrayList<Node> housenumbers = new ArrayList<Node>();
     115        ArrayList<Node> housenumbers = new ArrayList<>();
    116116        Node init = null;
    117117
     
    361361        // This list will contain nodes of the outline that are used in new lines.
    362362        // These nodes will not be deleted with the outline (if deleting was prompted).
    363         ArrayList<Node> reused_nodes = new ArrayList<Node>();
    364 
    365         this.commands = new LinkedList<Command>();
    366         Collection<Way> ways = new LinkedList<Way>();
     363        ArrayList<Node> reused_nodes = new ArrayList<>();
     364
     365        this.commands = new LinkedList<>();
     366        Collection<Way> ways = new LinkedList<>();
    367367
    368368        if (nb > 1) {
     
    401401                // Delete outline nodes having no tags and referrers but the outline itself
    402402                List<Node> nodes = outline.getNodes();
    403                 ArrayList<Node> nodesToDelete = new ArrayList<Node>();
     403                ArrayList<Node> nodesToDelete = new ArrayList<>();
    404404                for (Node n : nodes)
    405405                    if (!n.hasKeys() && n.getReferrers().size() == 1 && !reused_nodes.contains(n))
     
    462462                                tagsInConflict, primitives, Collections.singleton(outline));
    463463                        if (!conflictCommands.isEmpty()) {
    464                             List<Command> newCommands = new ArrayList<Command>(commands);
     464                            List<Command> newCommands = new ArrayList<>(commands);
    465465                            newCommands.addAll(conflictCommands);
    466466                            setSequence(newCommands.toArray(new Command[0]));
     
    638638        }
    639639
    640         return new Pair<Way, Way>(front, back);
     640        return new Pair<>(front, back);
    641641    }
    642642
     
    700700
    701701        final int length = a.length;
    702         ArrayList<SortWithIndex> sortable = new ArrayList<SortWithIndex>(length);
     702        ArrayList<SortWithIndex> sortable = new ArrayList<>(length);
    703703        for (int i = 0; i < length; ++i) {
    704704            sortable.add(new SortWithIndex(a[i], i));
Note: See TracChangeset for help on using the changeset viewer.