- Timestamp:
- 2009-12-04T19:11:45+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/OsmPrimitive.java
r2565 r2574 888 888 // Returns only referrers that are members of the same dataset (primitive can have some fake references, for example 889 889 // when way is cloned 890 if (referrers == null)891 return Collections.emptyList();892 893 if (referrers instanceof OsmPrimitive) {894 if (((OsmPrimitive)referrers).dataSet == dataSet)895 return Collections.singletonList((OsmPrimitive)referrers);896 else897 return Collections.emptyList();898 }899 900 890 List<OsmPrimitive> result = new ArrayList<OsmPrimitive>(); 901 for (OsmPrimitive o:(OsmPrimitive[])referrers) { 902 if (dataSet == o.dataSet) { 903 result.add(o); 891 if (referrers != null) { 892 if ((referrers instanceof OsmPrimitive) && (((OsmPrimitive)referrers).dataSet == dataSet)) { 893 result.add((OsmPrimitive)referrers); 894 } else { 895 for (OsmPrimitive o:(OsmPrimitive[])referrers) { 896 if (dataSet == o.dataSet) { 897 result.add(o); 898 } 899 } 904 900 } 905 901 }
Note:
See TracChangeset
for help on using the changeset viewer.