Modify

Opened 12 years ago

Closed 12 years ago

#4085 closed defect (fixed)

[Patch] Exception when trying to delete a way which has duplicate nodes

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

Description

An expetion occurs when trying to delete a way that has duplicate nodes (the same node appears multiple times in the way, eg. a way with node list: (1,1,2)).

Build-Date: 2009-12-04 13:44:48		
Revision: 2568
Is-Local-Build: true

Memory Usage: 63 MB / 910 MB (32 MB allocated, but free)
Java version: 1.6.0_17

Dataset consistency test:
No problems found


Plugins: PicLayer,lakewalker,measurement,utilsplugin,validator,wmsplugin
Plugin PicLayer Version: 18597
Plugin lakewalker Version: 18880
Plugin measurement Version: 18595
Plugin utilsplugin Version: 18926
Plugin validator Version: 18928
Plugin wmsplugin Version: 18762

java.lang.UnsupportedOperationException
	at java.util.AbstractList.remove(AbstractList.java:144)
	at java.util.AbstractList$Itr.remove(AbstractList.java:360)
	at java.util.AbstractCollection.removeAll(AbstractCollection.java:337)
	at org.openstreetmap.josm.command.DeleteCommand.computeNodesToDelete(DeleteCommand.java:256)
	at org.openstreetmap.josm.command.DeleteCommand.delete(DeleteCommand.java:316)
	at org.openstreetmap.josm.command.DeleteCommand.delete(DeleteCommand.java:287)
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.doActionPerformed(DeleteAction.java:148)
	at org.openstreetmap.josm.actions.mapmode.DeleteAction.actionPerformed(DeleteAction.java:135)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1633)
	at javax.swing.JComponent.processKeyBinding(JComponent.java:2839)
	at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:267)
	at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:216)
	at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2916)
	at javax.swing.JComponent.processKeyBindings(JComponent.java:2908)
	at javax.swing.JComponent.processKeyEvent(JComponent.java:2802)
	at java.awt.Component.processEvent(Component.java:6040)
	at java.awt.Container.processEvent(Container.java:2041)
	at java.awt.Component.dispatchEventImpl(Component.java:4630)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676)
	at java.awt.Component.dispatchEventImpl(Component.java:4502)
	at java.awt.Container.dispatchEventImpl(Container.java:2099)
	at java.awt.Window.dispatchEventImpl(Window.java:2475)
	at java.awt.Component.dispatchEvent(Component.java:4460)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Attached is an osm-file that contains such way.

Attachments (2)

waydelete.osm (355 bytes) - added by Daeron 12 years ago.
DeleteCommandException.patch (1.5 KB) - added by mjulius 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by Daeron

Attachment: waydelete.osm added

comment:1 Changed 12 years ago by mjulius

Summary: Exception when trying to delete a way which has duplicate nodes[Patch] Exception when trying to delete a way which has duplicate nodes

This is caused by OsmPrimitive.getReferrers() returning immutable lists.

The attached patch should fix that.

Changed 12 years ago by mjulius

comment:2 Changed 12 years ago by stoecker

Resolution: fixed
Status: newclosed

(In [2574]) fix #4085, #4084 - patch by mjulius - fix exception

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.