From: Christian P. (JIRA) <ji...@co...> - 2005-10-09 22:00:14
|
FeatureCollection.remove() is broken ------------------------------------ Key: GEOT-718 URL: http://jira.codehaus.org/browse/GEOT-718 Project: GeoTools Type: Bug Components: shapefile Versions: 2.1.RC1, 2.2.M0 Environment: WinXP, jre-1_5_0_04-windows-i586 Reporter: Christian Pschierer Assigned to: Ian Wolfe Schneider Attachments: MapViewer.java FeatureCollection.remove() does not work. The specified feature is not deleted from the FeatureCollection and the command returns false all the time. My guess is, that the problem is caused by the statement "boolean changed = contents.values().remove(f.getID());" in line 385 of org.geotools.feature.DefaultFeatureCollection. f.getID() returns a String object, but remove expects a Feature object. Testcase: I have modified the MapViewer example from the Geotools page to reproduce the problem. The additional commands in line 159ff should remove the first two features of the loaded shapefile, but they don't. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |