diff options
author | Paul Leacu | 2017-09-13 18:15:56 +0000 |
---|---|---|
committer | Paul Leacu | 2017-09-13 18:15:56 +0000 |
commit | c960e287fd619c6f03734b3f80227e48be204b86 (patch) | |
tree | d41d6618568866773279cdbb8eb18111a01e8de1 | |
parent | 985769aa546b222bad2c5ed405564eab6048c63f (diff) | |
download | org.eclipse.bpmn2-modeler-c960e287fd619c6f03734b3f80227e48be204b86.tar.gz org.eclipse.bpmn2-modeler-c960e287fd619c6f03734b3f80227e48be204b86.tar.xz org.eclipse.bpmn2-modeler-c960e287fd619c6f03734b3f80227e48be204b86.zip |
[522014] ClassCastException in BoundaryEventPositionHelper.canMoveTo
Change-Id: I48c0e07af75e1e0703a3c1f18d199c5a6885b640
Signed-off-by: Paul Leacu <pleacu@redhat.com>
-rw-r--r-- | plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java index 6e0363ce..c0954d2f 100644 --- a/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java +++ b/plugins/org.eclipse.bpmn2.modeler.core/src/org/eclipse/bpmn2/modeler/core/utils/BoundaryEventPositionHelper.java @@ -181,8 +181,11 @@ public class BoundaryEventPositionHelper { BoundaryEvent event = BusinessObjectUtil.getFirstElementOfType(context.getShape(), BoundaryEvent.class); GraphicsAlgorithm eventGa = context.getShape().getGraphicsAlgorithm(); - ContainerShape activityContainer = (ContainerShape) BusinessObjectUtil.getFirstBaseElementFromDiagram(diagram, - event.getAttachedToRef()); + PictogramElement firstBaseElement = BusinessObjectUtil.getFirstBaseElementFromDiagram(diagram, event.getAttachedToRef()); + if (firstBaseElement == null || !(firstBaseElement instanceof ContainerShape)) + return false; + + ContainerShape activityContainer = (ContainerShape)firstBaseElement; GraphicsAlgorithm activityGa = activityContainer.getGraphicsAlgorithm(); ILocation activityLoc = peService.getLocationRelativeToDiagram(activityContainer); |