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


Ignore:
Timestamp:
2017-02-21T01:04:28+01:00 (8 years ago)
Author:
Don-vip
Message:

see #11924 - remove workarounds for jdk9 compilation problems with diamond operator - sounds a lot like JDK-8075793 (solved in b150)

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

Legend:

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

    r10716 r11590  
    2525            return Collections.<Relation>emptySet();
    2626        } else {
    27             // Diamond operator does not work with Java 9 here
    28             return new SubclassFilteredCollection<OsmPrimitive, Relation>(
    29                     primitives, Relation.class::isInstance);
     27            return new SubclassFilteredCollection<>(primitives, Relation.class::isInstance);
    3028        }
    3129    }
  • trunk/src/org/openstreetmap/josm/command/DeleteCommand.java

    r11339 r11590  
    403403            return null;
    404404
    405         // Diamond operator does not work with Java 9 here
    406         @SuppressWarnings("unused")
    407         Set<OsmPrimitive> primitivesToDelete = new HashSet<OsmPrimitive>(selection);
     405        Set<OsmPrimitive> primitivesToDelete = new HashSet<>(selection);
    408406
    409407        Collection<Relation> relationsToDelete = Utils.filteredCollection(primitivesToDelete, Relation.class);
  • trunk/src/org/openstreetmap/josm/data/validation/tests/DuplicateNode.java

    r11339 r11590  
    310310    public Command fixError(TestError testError) {
    311311        if (!isFixable(testError)) return null;
    312         // Diamond operator does not work with Java 9 here
    313         @SuppressWarnings("unused")
    314         Collection<OsmPrimitive> sel = new LinkedList<OsmPrimitive>(testError.getPrimitives());
     312        Collection<OsmPrimitive> sel = new LinkedList<>(testError.getPrimitives());
    315313        Set<Node> nodes = new LinkedHashSet<>(OsmPrimitive.getFilteredList(sel, Node.class));
    316314
  • trunk/src/org/openstreetmap/josm/data/validation/tests/MultipolygonTest.java

    r11241 r11590  
    669669        // add multipolygon in order to let user select something and fix the error
    670670        if (!primitives.contains(r)) {
    671             // Diamond operator does not work with Java 9 here
    672             @SuppressWarnings("unused")
    673             List<OsmPrimitive> newPrimitives = new ArrayList<OsmPrimitive>(primitives);
     671            List<OsmPrimitive> newPrimitives = new ArrayList<>(primitives);
    674672            newPrimitives.add(0, r);
    675673            return newPrimitives;
Note: See TracChangeset for help on using the changeset viewer.