Changeset 9072 in josm for trunk/src/org/openstreetmap


Ignore:
Timestamp:
2015-11-30T22:57:02+01:00 (4 years ago)
Author:
Don-vip
Message:

partial revert of r9070 - make build run with Java 9 again

Location:
trunk/src/org/openstreetmap/josm
Files:
5 edited

Legend:

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

    r9070 r9072  
    2424            return Collections.<Relation>emptySet();
    2525        } else {
    26             return new SubclassFilteredCollection<>(primitives, OsmPrimitive.relationPredicate);
     26            // Diamond operator does not work with Java 9 here
     27            return new SubclassFilteredCollection<OsmPrimitive, Relation>(
     28                    primitives, OsmPrimitive.relationPredicate);
    2729        }
    2830    }
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r9070 r9072  
    368368            return null;
    369369
    370         Set<OsmPrimitive> primitivesToDelete = new HashSet<>(selection);
     370        // Diamond operator does not work with Java 9 here
     371        Set<OsmPrimitive> primitivesToDelete = new HashSet<OsmPrimitive>(selection);
    371372
    372373        Collection<Relation> relationsToDelete = Utils.filteredCollection(primitivesToDelete, Relation.class);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r9070 r9072  
    382382    public Command fixError(TestError testError) {
    383383        if (!isFixable(testError)) return null;
    384         Collection<OsmPrimitive> sel = new LinkedList<>(testError.getPrimitives());
     384        // Diamond operator does not work with Java 9 here
     385        Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>(testError.getPrimitives());
    385386        Set<Node> nodes = new LinkedHashSet<>(OsmPrimitive.getFilteredList(sel, Node.class));
    386387
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java

    r9070 r9072  
    302302                }
    303303            }
    304             List<OsmPrimitive> newPrimitives = new ArrayList<>(primitives);
     304            // Diamond operator does not work with Java 9 here
     305            List<OsmPrimitive> newPrimitives = new ArrayList<OsmPrimitive>(primitives);
    305306            newPrimitives.add(0, r);
    306307            error.setPrimitives(newPrimitives);
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r9070 r9072  
    141141
    142142    public static <T> Collection<T> filter(Collection<? extends T> collection, Predicate<? super T> predicate) {
    143         return new FilteredCollection<>(collection, predicate);
     143        // Diamond operator does not work with Java 9 here
     144        return new FilteredCollection<T>(collection, predicate);
    144145    }
    145146
Note: See TracChangeset for help on using the changeset viewer.