Index: /trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java	(revision 9071)
+++ /trunk/src/org/openstreetmap/josm/actions/relation/AbstractRelationAction.java	(revision 9072)
@@ -24,5 +24,7 @@
             return Collections.<Relation>emptySet();
         } else {
-            return new SubclassFilteredCollection<>(primitives, OsmPrimitive.relationPredicate);
+            // Diamond operator does not work with Java 9 here
+            return new SubclassFilteredCollection<OsmPrimitive, Relation>(
+                    primitives, OsmPrimitive.relationPredicate);
         }
     }
Index: /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 9071)
+++ /trunk/src/org/openstreetmap/josm/command/DeleteCommand.java	(revision 9072)
@@ -368,5 +368,6 @@
             return null;
 
-        Set<OsmPrimitive> primitivesToDelete = new HashSet<>(selection);
+        // Diamond operator does not work with Java 9 here
+        Set<OsmPrimitive> primitivesToDelete = new HashSet<OsmPrimitive>(selection);
 
         Collection<Relation> relationsToDelete = Utils.filteredCollection(primitivesToDelete, Relation.class);
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 9071)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java	(revision 9072)
@@ -382,5 +382,6 @@
     public Command fixError(TestError testError) {
         if (!isFixable(testError)) return null;
-        Collection<OsmPrimitive> sel = new LinkedList<>(testError.getPrimitives());
+        // Diamond operator does not work with Java 9 here
+        Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>(testError.getPrimitives());
         Set<Node> nodes = new LinkedHashSet<>(OsmPrimitive.getFilteredList(sel, Node.class));
 
Index: /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 9071)
+++ /trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java	(revision 9072)
@@ -302,5 +302,6 @@
                 }
             }
-            List<OsmPrimitive> newPrimitives = new ArrayList<>(primitives);
+            // Diamond operator does not work with Java 9 here
+            List<OsmPrimitive> newPrimitives = new ArrayList<OsmPrimitive>(primitives);
             newPrimitives.add(0, r);
             error.setPrimitives(newPrimitives);
Index: /trunk/src/org/openstreetmap/josm/tools/Utils.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 9071)
+++ /trunk/src/org/openstreetmap/josm/tools/Utils.java	(revision 9072)
@@ -141,5 +141,6 @@
 
     public static <T> Collection<T> filter(Collection<? extends T> collection, Predicate<? super T> predicate) {
-        return new FilteredCollection<>(collection, predicate);
+        // Diamond operator does not work with Java 9 here
+        return new FilteredCollection<T>(collection, predicate);
     }
 
