Changeset 7005 in josm for trunk/src/org/openstreetmap/josm/corrector
- Timestamp:
- 2014-04-26T17:39:23+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/corrector
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/corrector/ReverseWayTagCorrector.java
r6990 r7005 46 46 } 47 47 48 private static final Collection<Pattern> ignoredKeys = new ArrayList< Pattern>();48 private static final Collection<Pattern> ignoredKeys = new ArrayList<>(); 49 49 static { 50 50 for (String s : OsmPrimitive.getUninterestingKeys()) { … … 176 176 177 177 public static List<Way> irreversibleWays(List<Way> ways) { 178 List<Way> newWays = new ArrayList< Way>(ways);178 List<Way> newWays = new ArrayList<>(ways); 179 179 for (Way way : ways) { 180 180 if (isReversible(way)) { … … 197 197 @Override 198 198 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<>(); 203 202 for (String key : way.keySet()) { 204 203 String value = way.get(key); … … 223 222 } 224 223 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<>(); 228 226 229 227 Collection<OsmPrimitive> referrers = oldway.getReferrers(); -
trunk/src/org/openstreetmap/josm/corrector/TagCorrector.java
r6944 r7005 57 57 58 58 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<>(); 64 62 65 63 final JPanel p = new JPanel(new GridBagLayout()); … … 108 106 } 109 107 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")); 112 109 p.add(rolesLabel, GBC.std()); 113 110 … … 119 116 p.add(primitiveLabel, GBC.eol()); 120 117 121 final RoleCorrectionTable table = new RoleCorrectionTable( 122 roleCorrections); 118 final RoleCorrectionTable table = new RoleCorrectionTable(roleCorrections); 123 119 final JScrollPane scrollPane = new JScrollPane(table); 124 120 p.add(scrollPane, GBC.eop().fill(GBC.HORIZONTAL)); … … 156 152 // use this structure to remember keys that have been set already so that 157 153 // they're not dropped by a later step 158 Set<String> keysChanged = new HashSet< String>();154 Set<String> keysChanged = new HashSet<>(); 159 155 160 156 // apply all changes to this clone
Note:
See TracChangeset
for help on using the changeset viewer.