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

see #8465 - use diamond operator where applicable

Location:
trunk/src/org/openstreetmap/josm/corrector
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java

    r6990 r7005  
    4646    }
    4747
    48     private static final Collection<Pattern> ignoredKeys = new ArrayList<Pattern>();
     48    private static final Collection<Pattern> ignoredKeys = new ArrayList<>();
    4949    static {
    5050        for (String s : OsmPrimitive.getUninterestingKeys()) {
     
    176176
    177177    public static List<Way> irreversibleWays(List<Way> ways) {
    178         List<Way> newWays = new ArrayList<Way>(ways);
     178        List<Way> newWays = new ArrayList<>(ways);
    179179        for (Way way : ways) {
    180180            if (isReversible(way)) {
     
    197197    @Override
    198198    public Collection<Command> execute(Way oldway, Way way) throws UserCancelException {
    199         Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap =
    200             new HashMap<OsmPrimitive, List<TagCorrection>>();
    201 
    202         List<TagCorrection> tagCorrections = new ArrayList<TagCorrection>();
     199        Map<OsmPrimitive, List<TagCorrection>> tagCorrectionsMap = new HashMap<>();
     200
     201        List<TagCorrection> tagCorrections = new ArrayList<>();
    203202        for (String key : way.keySet()) {
    204203            String value = way.get(key);
     
    223222        }
    224223
    225         Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap =
    226             new HashMap<OsmPrimitive, List<RoleCorrection>>();
    227         List<RoleCorrection> roleCorrections = new ArrayList<RoleCorrection>();
     224        Map<OsmPrimitive, List<RoleCorrection>> roleCorrectionMap = new HashMap<>();
     225        List<RoleCorrection> roleCorrections = new ArrayList<>();
    228226
    229227        Collection<OsmPrimitive> referrers = oldway.getReferrers();
  • trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java

    r6944 r7005  
    5757
    5858        if (!tagCorrectionsMap.isEmpty() || !roleCorrectionMap.isEmpty()) {
    59             Collection<Command> commands = new ArrayList<Command>();
    60             Map<OsmPrimitive, TagCorrectionTable> tagTableMap =
    61                 new HashMap<OsmPrimitive, TagCorrectionTable>();
    62             Map<OsmPrimitive, RoleCorrectionTable> roleTableMap =
    63                 new HashMap<OsmPrimitive, RoleCorrectionTable>();
     59            Collection<Command> commands = new ArrayList<>();
     60            Map<OsmPrimitive, TagCorrectionTable> tagTableMap = new HashMap<>();
     61            Map<OsmPrimitive, RoleCorrectionTable> roleTableMap = new HashMap<>();
    6462
    6563            final JPanel p = new JPanel(new GridBagLayout());
     
    108106                }
    109107
    110                 final JLabel rolesLabel = new JLabel(
    111                         tr("Roles in relations referring to"));
     108                final JLabel rolesLabel = new JLabel(tr("Roles in relations referring to"));
    112109                p.add(rolesLabel, GBC.std());
    113110
     
    119116                p.add(primitiveLabel, GBC.eol());
    120117
    121                 final RoleCorrectionTable table = new RoleCorrectionTable(
    122                         roleCorrections);
     118                final RoleCorrectionTable table = new RoleCorrectionTable(roleCorrections);
    123119                final JScrollPane scrollPane = new JScrollPane(table);
    124120                p.add(scrollPane, GBC.eop().fill(GBC.HORIZONTAL));
     
    156152                    // use this structure to remember keys that have been set already so that
    157153                    // they're not dropped by a later step
    158                     Set<String> keysChanged = new HashSet<String>();
     154                    Set<String> keysChanged = new HashSet<>();
    159155
    160156                    // apply all changes to this clone
Note: See TracChangeset for help on using the changeset viewer.