Modify

Opened 13 years ago

Closed 13 years ago

#3817 closed defect (fixed)

[PATCH] fix DataSet cast warning

Reported by: hansendc Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

[javac] src/org/openstreetmap/josm/data/osm/DataSet.java:634: warning: [unchecked] unchecked cast
[javac] found : java.util.Collection<capture#506 of ? extends org.openstreetmap.josm.data.osm.OsmPrimitive>
[javac] required: java.util.Set<? extends org.openstreetmap.josm.data.osm.OsmPrimitive>
[javac] referred = (Set<? extends OsmPrimitive>)primitives;
[javac]

The following patch uses two copies of getReferringRelations(). One takes a raw collection and the other an actual set. This avoids the casting, but still preserves the optimization that was there.

Attachments (1)

fix-DataSet-cast-warning.patch (1.1 KB) - added by hansendc 13 years ago.

Download all attachments as: .zip

Change History (2)

Changed 13 years ago by hansendc

comment:1 Changed 13 years ago by Gubaer

Resolution: fixed
Status: newclosed

(In [2352]) applied #3817: applied patch by hansendc: fix DataSet cast warning

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.