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


Ignore:
Timestamp:
2018-12-10T00:06:45+01:00 (6 years ago)
Author:
Don-vip
Message:

see #16854 - fix java warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/io/AbstractReader.java

    r14535 r14543  
    609609    }
    610610
    611     @SuppressWarnings("unchecked")
    612     private <T extends OsmPrimitive> T buildPrimitive(PrimitiveData pd) {
     611    private OsmPrimitive buildPrimitive(PrimitiveData pd) {
    613612        OsmPrimitive p;
    614613        if (pd.getUniqueId() < AbstractPrimitive.currentUniqueId()) {
     
    620619        p.load(pd);
    621620        externalIdMap.put(pd.getPrimitiveId(), p);
    622         return (T) p;
     621        return p;
    623622    }
    624623
    625624    private Node addNode(NodeData nd, NodeReader nodeReader) throws IllegalDataException {
    626         Node n = buildPrimitive(nd);
     625        Node n = (Node) buildPrimitive(nd);
    627626        nodeReader.accept(n);
    628627        return n;
     
    672671        WayData wd = new WayData(0);
    673672        commonReader.accept(wd);
    674         Way w = buildPrimitive(wd);
     673        Way w = (Way) buildPrimitive(wd);
    675674
    676675        Collection<Long> nodeIds = new ArrayList<>();
     
    687686        RelationData rd = new RelationData(0);
    688687        commonReader.accept(rd);
    689         Relation r = buildPrimitive(rd);
     688        Relation r = (Relation) buildPrimitive(rd);
    690689
    691690        Collection<RelationMemberData> members = new ArrayList<>();
Note: See TracChangeset for help on using the changeset viewer.