Ignore:
Timestamp:
2014-04-26T17:39:23+02:00 (10 years ago)
Author:
Don-vip
Message:

see #8465 - use diamond operator where applicable

File:
1 edited

Legend:

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

    r6913 r7005  
    174174            return selectedRelations.iterator().next();
    175175        } else {
    176             final HashSet<Relation> relatedRelations = new HashSet<Relation>();
     176            final HashSet<Relation> relatedRelations = new HashSet<>();
    177177            for (final Way w : selectedWays) {
    178178                relatedRelations.addAll(Utils.filteredCollection(w.getReferrers(), Relation.class));
     
    188188
    189189        // add ways of existing relation to include them in polygon analysis
    190         Set<Way> ways = new HashSet<Way>(selectedWays);
     190        Set<Way> ways = new HashSet<>(selectedWays);
    191191        ways.addAll(selectedMultipolygonRelation.getMemberPrimitives(Way.class));
    192192
     
    303303    private static void addMembers(JoinedPolygon polygon, Relation rel, String role) {
    304304        final int count = rel.getMembersCount();
    305         final HashSet<Way> ways = new HashSet<Way>(polygon.ways);
     305        final HashSet<Way> ways = new HashSet<>(polygon.ways);
    306306        for (int i = 0; i < count; i++) {
    307307            final RelationMember m = rel.getMember(i);
     
    325325     */
    326326    public static List<Command> removeTagsFromWaysIfNeeded( Relation relation ) {
    327         Map<String, String> values = new HashMap<String, String>(relation.getKeys());
    328 
    329         List<Way> innerWays = new ArrayList<Way>();
    330         List<Way> outerWays = new ArrayList<Way>();
    331 
    332         Set<String> conflictingKeys = new TreeSet<String>();
     327        Map<String, String> values = new HashMap<>(relation.getKeys());
     328
     329        List<Way> innerWays = new ArrayList<>();
     330        List<Way> outerWays = new ArrayList<>();
     331
     332        Set<String> conflictingKeys = new TreeSet<>();
    333333
    334334        for( RelationMember m : relation.getMembers() ) {
     
    371371        values.put("area", "yes");
    372372
    373         List<Command> commands = new ArrayList<Command>();
     373        List<Command> commands = new ArrayList<>();
    374374        boolean moveTags = Main.pref.getBoolean("multipoly.movetags", true);
    375375
    376376        for (Entry<String, String> entry : values.entrySet()) {
    377             List<OsmPrimitive> affectedWays = new ArrayList<OsmPrimitive>();
     377            List<OsmPrimitive> affectedWays = new ArrayList<>();
    378378            String key = entry.getKey();
    379379            String value = entry.getValue();
Note: See TracChangeset for help on using the changeset viewer.