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/data/validation/tests/MapCSSTagChecker.java

    r6986 r7005  
    6969    }
    7070
    71     final List<TagCheck> checks = new ArrayList<TagCheck>();
     71    final List<TagCheck> checks = new ArrayList<>();
    7272
    7373    static class TagCheck implements Predicate<OsmPrimitive> {
    7474        protected final MapCSSRule rule;
    75         protected final List<PrimitiveToTag> change = new ArrayList<PrimitiveToTag>();
    76         protected final Map<String, String> keyChange = new LinkedHashMap<String, String>();
    77         protected final List<String> alternatives = new ArrayList<String>();
    78         protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap<Instruction.AssignmentInstruction, Severity>();
    79         protected final Map<String, Boolean> assertions = new HashMap<String, Boolean>();
     75        protected final List<PrimitiveToTag> change = new ArrayList<>();
     76        protected final Map<String, String> keyChange = new LinkedHashMap<>();
     77        protected final List<String> alternatives = new ArrayList<>();
     78        protected final Map<Instruction.AssignmentInstruction, Severity> errors = new HashMap<>();
     79        protected final Map<String, Boolean> assertions = new HashMap<>();
    8080
    8181        TagCheck(MapCSSRule rule) {
     
    180180            // Ignore "meta" rule(s) from external rules of JOSM wiki
    181181            removeMetaRules(source);
    182             return new ArrayList<TagCheck>(Utils.transform(source.rules, new Utils.Function<MapCSSRule, TagCheck>() {
     182            return new ArrayList<>(Utils.transform(source.rules, new Utils.Function<MapCSSRule, TagCheck>() {
    183183                @Override
    184184                public TagCheck apply(MapCSSRule x) {
     
    297297            }
    298298            final Selector matchingSelector = whichSelectorMatchesPrimitive(p);
    299             Collection<Command> cmds = new LinkedList<Command>();
     299            Collection<Command> cmds = new LinkedList<>();
    300300            for (PrimitiveToTag toTag : change) {
    301301                final Tag tag = toTag.apply(p);
     
    416416     */
    417417    public Collection<TestError> getErrorsForPrimitive(OsmPrimitive p, boolean includeOtherSeverity) {
    418         final ArrayList<TestError> r = new ArrayList<TestError>();
     418        final ArrayList<TestError> r = new ArrayList<>();
    419419        final Environment env = new Environment(p, new MultiCascade(), Environment.DEFAULT_LAYER, null);
    420420        for (TagCheck check : checks) {
Note: See TracChangeset for help on using the changeset viewer.