Ignore:
Timestamp:
2009-10-30T22:23:12+01:00 (15 years ago)
Author:
Gubaer
Message:

applied #3817: applied patch by hansendc: fix DataSet cast warning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/osm/DataSet.java

    r2348 r2352  
    628628
    629629    public Set<Relation> getReferringRelations(Collection<? extends OsmPrimitive> primitives) {
     630        return this.getReferringRelations(new HashSet<OsmPrimitive>(primitives));
     631    }
     632    public Set<Relation> getReferringRelations(Set<? extends OsmPrimitive> referred) {
    630633        HashSet<Relation> ret = new HashSet<Relation>();
    631         if (primitives == null) return ret;
    632         Set<? extends OsmPrimitive> referred;
    633         if (primitives instanceof Set<?>) {
    634             referred = (Set<? extends OsmPrimitive>)primitives;
    635         } else {
    636             referred = new HashSet<OsmPrimitive>(primitives);
    637         }
     634        if (referred == null) return ret;
    638635        referred.remove(null); // just in case - remove null element from primitives
    639636        for (Relation r: relations) {
Note: See TracChangeset for help on using the changeset viewer.