Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333185

Summary: [Dawn] ClasscastException in DawnDiagramUpdater
Product: [Modeling] EMF Reporter: Martin Fluegge <martin.fluegge>
Component: cdo.dawnAssignee: Martin Fluegge <martin.fluegge>
Status: CLOSED FIXED QA Contact: Eike Stepper <stepper>
Severity: normal    
Priority: P3    
Version: 4.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Patch v1 none

Description Martin Fluegge CLA 2010-12-24 05:50:05 EST
The DawnDiagramUpdater casts to the wrong interface. This leads to the following exception

Caused by: java.lang.ClassCastException: org.eclipse.gmf.runtime.notation.impl.EdgeImpl cannot be cast to org.eclipse.gmf.runtime.notation.Connector
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refeshEditpartInternal(DawnDiagramUpdater.java:156)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refeshEditpartInternal(DawnDiagramUpdater.java:168)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refreshEditPart(DawnDiagramUpdater.java:73)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater$2.run(DawnDiagramUpdater.java:84)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.emf.cdo.dawn.util.DawnDiagramUpdater.refreshEditPart(DawnDiagramUpdater.java:80)
	at org.eclipse.emf.cdo.dawn.notifications.impl.DawnGMFHandler.refresh(DawnGMFHandler.java:275)
	at org.eclipse.emf.cdo.dawn.notifications.impl.DawnGMFHandler.modifyingObject(DawnGMFHandler.java:115)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.registerFeatureDelta(CDOTransactionImpl.java:1515)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.registerDirty(CDOTransactionImpl.java:1534)
	at org.eclipse.emf.internal.cdo.CDOStateMachine$WriteTransition.execute(CDOStateMachine.java:805)
	at org.eclipse.emf.internal.cdo.CDOStateMachine$WriteTransition.execute(CDOStateMachine.java:1)
	at org.eclipse.net4j.util.fsm.FiniteStateMachine.process(FiniteStateMachine.java:162)
	at org.eclipse.emf.internal.cdo.CDOStateMachine.writeWithoutViewLock(CDOStateMachine.java:386)
	at org.eclipse.emf.internal.cdo.CDOStateMachine.write(CDOStateMachine.java:371)
	at org.eclipse.emf.internal.cdo.CDOStore.getRevisionForWriting(CDOStore.java:620)
	at org.eclipse.emf.internal.cdo.CDOStore.set(CDOStore.java:341)
	at org.eclipse.emf.internal.cdo.CDOLegacyAdapter.notifyChanged(CDOLegacyAdapter.java:82)
	at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:380)
	at org.eclipse.gmf.runtime.notation.impl.RelativeBendpointsImpl.setPoints(RelativeBendpointsImpl.java:115)
	at org.eclipse.gmf.runtime.diagram.ui.internal.commands.SetConnectionBendpointsCommand.doExecuteWithResult(SetConnectionBendpointsCommand.java:164)
	at org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand.doExecute(AbstractTransactionalCommand.java:247)
	at org.eclipse.emf.workspace.AbstractEMFOperation.execute(AbstractEMFOperation.java:150)
	at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:511)
	... 37 more
Comment 1 Martin Fluegge CLA 2010-12-24 06:07:41 EST
Created attachment 185805 [details]
Patch v1

Changed the cast to Edge, which is higher in the inheritance hierarchy.
Comment 2 Martin Fluegge CLA 2010-12-24 06:08:16 EST
Committed to HEAD.
Comment 3 Eike Stepper CLA 2011-06-23 03:40:31 EDT
Available in R20110608-1407